![]() |
API
2.2
TSmarT Software Library
|
Functions | |
int8_t | TSMART_XBEE_868_Init (tsmart_xbee_868_t *TSMART_XBEE_868, tsmart_xbee_868_config_t *TSMART_XBEE_868_config) |
Initialize the XBee module. More... | |
void | TSMART_XBEE_868_InitStruct (tsmart_xbee_868_config_device_t *TSMART_XBEE_868_config_device) |
Initializes tsmart_xbee_868_config_device_t structure. More... | |
int8_t | TSMART_XBEE_868_Config (tsmart_xbee_868_t *TSMART_XBEE_868, tsmart_xbee_868_config_device_t *TSMART_XBEE_868_config_device) |
Configures a XBEE 868 Device. More... | |
int8_t | TSMART_XBEE_868_TransparentMode (tsmart_xbee_868_t *TSMART_XBEE_868, tsmart_xbee_868_flag_t TSMART_XBEE_868_flag) |
Enters/Exits from transparent mode to receive or send data. More... | |
int8_t | TSMART_XBEE_868_AtCommandMode (tsmart_xbee_868_t *TSMART_XBEE_868, tsmart_xbee_868_flag_t TSMART_XBEE_868_flag) |
Enters or exits from the AT command mode. More... | |
int32_t | TSMART_XBEE_868_Send (tsmart_xbee_868_t *TSMART_XBEE_868, uint8_t *TSMART_XBEE_868_buf, uint32_t TSMART_XBEE_868_nbytes, portTickType TSMART_XBEE_868_xticks) |
Sends data to remote XBee module. More... | |
int32_t | TSMART_XBEE_868_Receive (tsmart_xbee_868_t *TSMART_XBEE_868, uint8_t *TSMART_XBEE_868_buf, uint32_t TSMART_XBEE_868_nbytes, portTickType TSMART_XBEE_868_xticks) |
Receives data from the XBee module. More... | |
int16_t | TSMART_XBEE_868_ReceiveApiFrame (tsmart_xbee_868_t *TSMART_XBEE_868, tsmart_xbee_868_data_received_t *TSMART_XBEE_868_data, portTickType TSMART_XBEE_868_xticks) |
Receives a frame using API mode. More... | |
int8_t | TSMART_XBEE_868_SendApiFrame (tsmart_xbee_868_t *TSMART_XBEE_868, tsmart_xbee_868_data_to_send_t *TSMART_XBEE_868_data, portTickType TSMART_XBEE_868_xticks) |
Sends a frame using API mode. More... | |
int8_t | TSMART_XBEE_868_PowerSignalReceived (tsmart_xbee_868_t *TSMART_XBEE_868) |
Reports the received signal strength (RSSI) of last received packet. More... | |
int8_t | TSMART_XBEE_868_ReadSatus (tsmart_xbee_868_t *TSMART_XBEE_868, portTickType TSMART_XBEE_868_timeout) |
Read one status message. More... | |
int32_t | TSMART_XBEE_868_ReadLowAddress (tsmart_xbee_868_t *TSMART_XBEE_868) |
Reads the low part of the local XBee address. More... | |
int32_t | TSMART_XBEE_868_ReadHighAddress (tsmart_xbee_868_t *TSMART_XBEE_868) |
Reads the high part of the local XBee address. More... | |
int8_t | TSMART_XBEE_868_ChangePowerLevel (tsmart_xbee_868_t *TSMART_XBEE_868, uint8_t TSMART_XBEE_868_power_level) |
Changes transmitter RF power. More... | |
int8_t TSMART_XBEE_868_AtCommandMode | ( | tsmart_xbee_868_t * | TSMART_XBEE_868, |
tsmart_xbee_868_flag_t | TSMART_XBEE_868_flag | ||
) |
Enters or exits from the AT command mode.
Using this function is possible to send AT commands to the XBee module using the TSMART_XBEE_868_Send() and TSMART_XBEE_868_Receive() functions.
TSMART_XBEE_868 | XBee structure handler. |
TSMART_XBEE_868_flag | Label to enter/exit the AT command mode. |
int8_t TSMART_XBEE_868_ChangePowerLevel | ( | tsmart_xbee_868_t * | TSMART_XBEE_868, |
uint8_t | TSMART_XBEE_868_power_level | ||
) |
Changes transmitter RF power.
TSMART_XBEE_868 | XBee 868 structure handler. |
TSMART_XBEE_868_power_level | Power level. Range[0(lowest)-4(highest)] |
int8_t TSMART_XBEE_868_Config | ( | tsmart_xbee_868_t * | TSMART_XBEE_868, |
tsmart_xbee_868_config_device_t * | TSMART_XBEE_868_config_device | ||
) |
Configures a XBEE 868 Device.
This function configures a XBEE 868 device with user's values.
TSMART_XBEE_868 | XBee 868 structure handler. |
TSMART_XBEE_868_config_device | Contains the XBee 868 configuration. |
int8_t TSMART_XBEE_868_Init | ( | tsmart_xbee_868_t * | TSMART_XBEE_868, |
tsmart_xbee_868_config_t * | TSMART_XBEE_868_config | ||
) |
Initialize the XBee module.
This functions initializes the hardware configuration of the XBee 868 and the associated OS mechanisms.
TSMART_XBEE_868 | XBee 868 structure handler. |
TSMART_XBEE_868_config | Indicates the baud rate for the microcontroller's UART, enables/disables flow control and the priority reception task. |
void TSMART_XBEE_868_InitStruct | ( | tsmart_xbee_868_config_device_t * | TSMART_XBEE_868_config_device | ) |
Initializes tsmart_xbee_868_config_device_t structure.
This function shall be called before configure the XBee 868 module to set the default values. Check default values in tsmart_xbee_868_config_device_t definition.
TSMART_XBEE_868_config_device | Configuration device structure. It shall be empty. |
int8_t TSMART_XBEE_868_PowerSignalReceived | ( | tsmart_xbee_868_t * | TSMART_XBEE_868 | ) |
Reports the received signal strength (RSSI) of last received packet.
The returned value only indicates the signal strength of the last hop. It does not provide an accurate quality measurement for a multihop link. The returned value is measured in -dBm.
TSMART_XBEE_868 | XBee 868 structure handler. |
int32_t TSMART_XBEE_868_ReadHighAddress | ( | tsmart_xbee_868_t * | TSMART_XBEE_868 | ) |
Reads the high part of the local XBee address.
TSMART_XBEE_868 | XBee 868 structure handler. |
int32_t TSMART_XBEE_868_ReadLowAddress | ( | tsmart_xbee_868_t * | TSMART_XBEE_868 | ) |
Reads the low part of the local XBee address.
TSMART_XBEE_868 | XBee 868 structure handler. |
int8_t TSMART_XBEE_868_ReadSatus | ( | tsmart_xbee_868_t * | TSMART_XBEE_868, |
portTickType | TSMART_XBEE_868_timeout | ||
) |
Read one status message.
This function remains blocked until expires a selected timeout or until one status message is received. The messages will be queued in the proper buffer until it's full (it can store 5 messages). Users should empty the buffer executing this function to avoid lose new messages.
TSMART_XBEE_868 | XBee 868 structure handler. |
TSMART_XBEE_868_timeout | Maximum timeout to wait a new status message. |
int32_t TSMART_XBEE_868_Receive | ( | tsmart_xbee_868_t * | TSMART_XBEE_868, |
uint8_t * | TSMART_XBEE_868_buf, | ||
uint32_t | TSMART_XBEE_868_nbytes, | ||
portTickType | TSMART_XBEE_868_xticks | ||
) |
Receives data from the XBee module.
This function should be used to receive AT response command in command mode or to receive data in transparent mode.
TSMART_XBEE_868 | XBee 868 structure handler. |
TSMART_XBEE_868_buf | Data buffer to store data. |
TSMART_XBEE_868_nbytes | Number of bytes to receive. |
TSMART_XBEE_868_xticks | Maximum waiting timeout. |
int16_t TSMART_XBEE_868_ReceiveApiFrame | ( | tsmart_xbee_868_t * | TSMART_XBEE_868, |
tsmart_xbee_868_data_received_t * | TSMART_XBEE_868_data, | ||
portTickType | TSMART_XBEE_868_xticks | ||
) |
Receives a frame using API mode.
TSMART_XBEE_868 | XBee 868 structure handler. |
TSMART_XBEE_868_data | Data structure to store data. |
TSMART_XBEE_868_xticks | Maximum waiting timeout. |
int32_t TSMART_XBEE_868_Send | ( | tsmart_xbee_868_t * | TSMART_XBEE_868, |
uint8_t * | TSMART_XBEE_868_buf, | ||
uint32_t | TSMART_XBEE_868_nbytes, | ||
portTickType | TSMART_XBEE_868_xticks | ||
) |
Sends data to remote XBee module.
This function should be used to send AT command in command mode or to send data in transparent mode.
TSMART_XBEE_868 | XBee structure handler. |
TSMART_XBEE_868_buf | Data buffer to send. |
TSMART_XBEE_868_nbytes | Bytes to send |
TSMART_XBEE_868_xticks | Maximum waiting timeout. |
int8_t TSMART_XBEE_868_SendApiFrame | ( | tsmart_xbee_868_t * | TSMART_XBEE_868, |
tsmart_xbee_868_data_to_send_t * | TSMART_XBEE_868_data, | ||
portTickType | TSMART_XBEE_868_xticks | ||
) |
Sends a frame using API mode.
This function can be waiting for ACK setting the ID frame different than 0. Waiting ACK can delay the sending but ensures it.
TSMART_XBEE_868 | XBee 868 structure handler. |
TSMART_XBEE_868_data | Data structure to send. |
TSMART_XBEE_868_xticks | Maximum waiting timeout. |
int8_t TSMART_XBEE_868_TransparentMode | ( | tsmart_xbee_868_t * | TSMART_XBEE_868, |
tsmart_xbee_868_flag_t | TSMART_XBEE_868_flag | ||
) |
Enters/Exits from transparent mode to receive or send data.
Using this function is possible to send or receive transparent data to the XBee module using the TSMART_XBEE_868_Send() and TSMART_XBEE_868_Receive() functions.
TSMART_XBEE_868 | XBee 868 structure handler. |
TSMART_XBEE_868_flag | Label to enter/exit the transparent internal mode. |