User's Manual
-57-
Services
Methods
Name Description
void __construct (String device_ID)
Class constructor.
Device ID has to be sent as a parameter. It will be saved in the attribute
device_id.
void reset (void)
Reset all attributes.
void get_info (String data)
Decode the information received from the node and store it in the
attribute info.
The information received from the node has to be sent as a parameter.
The information decoded will be saved in the attribute info.
Boolean waiting_response(void)
It returns a boolean to know if it necessary to send a response for the
frame received.
String get_response(void)
It returns a string to send to the node.
Array get_data(void)
It returns an array with all information decoded.
Using the
get_data method of this class, users will get an array with the decoded information received from the
QRGH'DWDZLOOGHSHQGRQWKHIUDPHW\SHUHFHLYHG7KHVHȴYHSDUDPHWHUVDUHFRPPRQLQDOOIUDPHW\SHV
Name Description
device_id
ID of the device
battery
Battery level.
[0 = good charge level | 1 = little charge level]
parking
Status of the parking slot
[0 = empty | 1 = occupied]
frame_counter
Counter of the frames received.
frame_type
Counter of the frames received.
[0 = Info frame | 1 = Keep-Alive frame | 2 = Daily update
frame | 3 = Error frame | 4 = Start frame 1 | 5 = Start
frame 2]
And then, these are the parameters for each frame type:
Frame type 0 = Info frame
Name Description
temperature_msb
Raw temperature from the parking internal sensor.
To convert to Celsius degrees use the next formula:
2QO\DYDLODEOHLQȴUPZDUHY[[
temperature_lsb
temperature
Temperature (Celsius degrees) from the node’s internal sensor. The
value of temperature is a signed integer.
2QO\DYDLODEOHIURPȴUPZDUHY[[
x_msb
Reference value from the sensor associated to the X axis.
x_lsb
y_msb
Reference value from the sensor associated to the Y axis.
y_lsb
z_msb
Reference value from the sensor associated to the Z axis.
z_lsb