![]() |
API
2.2
TSmarT Software Library
|
Functions | |
int8_t | TSMART_XBEE_ZB_Init (tsmart_xbee_zb_t *TSMART_XBEE_ZB, tsmart_xbee_zb_config_t *TSMART_XBEE_ZB_config) |
Initialize the XBee module. More... | |
int8_t | TSMART_XBEE_ZB_InitStructEndDevice (tsmart_xbee_zb_config_device_t *TSMART_XBEE_ZB_config_device) |
Default configuration function for end device. More... | |
int8_t | TSMART_XBEE_ZB_InitStructCoordinator (tsmart_xbee_zb_config_device_t *TSMART_XBEE_ZB_config_device) |
Default configuration function for coordinator. More... | |
int8_t | TSMART_XBEE_ZB_InitStructRouter (tsmart_xbee_zb_config_device_t *TSMART_XBEE_ZB_config_device) |
Default configuration function for router. More... | |
int8_t | TSMART_XBEE_ZB_Config (tsmart_xbee_zb_t *TSMART_XBEE_ZB, tsmart_xbee_zb_config_device_t *TSMART_XBEE_ZB_config_device) |
Configuration for XBee zigbee Device. More... | |
int8_t | TSMART_XBEE_ZB_SendAtCommandApiConfiguration (tsmart_xbee_zb_t *TSMART_XBEE_ZB, uint8_t *TSMART_XBEE_ZB_answer_buffer, uint8_t TSMART_XBEE_ZB_frame_id,uint8_t *TSMART_XBEE_ZB_payload, uint8_t TSMART_XBEE_ZB_payload_size, portTickType TSMART_XBEE_ZB_timeout) |
Sends a configuration command. More... | |
tsmart_xbee_zb_status_message_t | TSMART_XBEE_ZB_ReadSatus (tsmart_xbee_zb_t *TSMART_XBEE_ZB, portTickType TSMART_XBEE_ZB_timeout) |
Reads one status message. More... | |
int8_t | TSMART_XBEE_ZB_PowerSignalReceived (tsmart_xbee_zb_t *TSMART_XBEE_ZB) |
Reports the RF power signal (RSSI) of last received packet. More... | |
int8_t | TSMART_XBEE_ZB_NumberRemainingChildren (tsmart_xbee_zb_t *TSMART_XBEE_ZB) |
Number of Remaining Children. More... | |
int8_t | TSMART_XBEE_ZB_NetworkReset (tsmart_xbee_zb_t *TSMART_XBEE_ZB, tsmart_xbee_zb_rts_network_type TSMART_XBEE_ZB_type) |
Network reset. More... | |
int8_t | TSMART_XBEE_ZB_DiscoverNodes (tsmart_xbee_zb_t *TSMART_XBEE_ZB, uint8_t TSMART_XBEE_ZB_max_nodes, tsmart_xbee_zb_discovered_node_t *TSMART_XBEE_ZB_discovered_node, uint8_t TSMART_XBEE_ZB_Timeout) |
Node Discovery Timeout. More... | |
tsmart_xbee_zb_ai_t | TSMART_XBEE_ZB_AssociationIndication (tsmart_xbee_zb_t *TSMART_XBEE_ZB) |
Association Indication. More... | |
int32_t | TSMART_XBEE_ZB_ReceiveApiFrame (tsmart_xbee_zb_t *TSMART_XBEE_ZB, tsmart_xbee_zb_data_received_t *TSMART_XBEE_ZB_data, portTickType TSMART_XBEE_ZB_xticks) |
Receives ZigBee API frame. More... | |
tsmart_xbee_zb_tx_status_t | TSMART_XBEE_ZB_SendApiFrame (tsmart_xbee_zb_t *TSMART_XBEE_ZB, tsmart_xbee_zb_data_to_send_t *TSMART_XBEE_ZB_data, portTickType TSMART_XBEE_ZB_xticks) |
Sends a ZigBee API frame. More... | |
uint32_t | TSMART_XBEE_ZB_ReadHighAddress (tsmart_xbee_zb_t *TSMART_XBEE_ZB) |
Reads the high XBee address. More... | |
uint32_t | TSMART_XBEE_ZB_ReadLowAddress (tsmart_xbee_zb_t *TSMART_XBEE_ZB) |
Reads the low XBee address. More... | |
uint16_t | TSMART_XBEE_ZB_ReadNetworkAddress (tsmart_xbee_zb_t *TSMART_XBEE_ZB) |
Reads the MY XBee address. More... | |
int8_t | TSMART_XBEE_ZB_HWSleep (tsmart_xbee_zb_t *TSMART_XBEE_ZB, tsmart_xbee_zb_flag_t TSMART_XBEE_ZB_flag) |
Hardware Sleep. More... | |
int8_t | TSMART_XBEE_ZB_CheckOnSleep (tsmart_xbee_zb_t *TSMART_XBEE_ZB) |
Checks OnSleep state. More... | |
tsmart_xbee_zb_ai_t TSMART_XBEE_ZB_AssociationIndication | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB | ) |
Association Indication.
Reads information regarding last node join request.
TSMART_XBEE_ZB | XBee zigbee structure handler. |
@arg TSMART_XBEE_ZB_AI_1 - Successfully formed or joined a network. (Coordinators form a network, routers and end devices join a network @arg TSMART_XBEE_ZB_AI_2 - Scan found no PANs @arg TSMART_XBEE_ZB_AI_3 - Scan found no valid PANs based on current SC and ID settings @arg TSMART_XBEE_ZB_AI_4 - Valid coordinator or routers found, but they are not allowing joining (NJ expired) @arg TSMART_XBEE_ZB_AI_5 - No joinable beacons were found @arg TSMART_XBEE_ZB_AI_6 - Unexpected state, node should not be attempting to join at this time @arg TSMART_XBEE_ZB_AI_7 - Node joining attempt failed (typically due to incompatible security settings) @arg TSMART_XBEE_ZB_AI_8 - Coordinator Start attempt failed @arg TSMART_XBEE_ZB_AI_9 - Checking for an existing coordinator @arg TSMART_XBEE_ZB_AI_10 - Attempt to leave the network failed @arg TSMART_XBEE_ZB_AI_11 - Attempted to join a device that did not respond @arg TSMART_XBEE_ZB_AI_12 - Secure join error - network security key received unsecured @arg TSMART_XBEE_ZB_AI_13 - Secure join error - network security key not received @arg TSMART_XBEE_ZB_AI_14 - Secure join error - joining device does not have the right preconfigured link key @arg TSMART_XBEE_ZB_AI_15 - Scanning for a ZigBee network (routers and end devices) @arg TSMART_XBEE_ZB_AI_16 - Wrong answer or there's not answer
int8_t TSMART_XBEE_ZB_CheckOnSleep | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB | ) |
Checks OnSleep state.
TSMART_XBEE_ZB |
int8_t TSMART_XBEE_ZB_Config | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB, |
tsmart_xbee_zb_config_device_t * | TSMART_XBEE_ZB_config_device | ||
) |
Configuration for XBee zigbee Device.
This function configures XBEE zigbee device with user's values.
TSMART_XBEE_ZB | XBee zigbee structure handler. |
TSMART_XBEE_ZB_config_device | Contains the XBee zigbee configuration. |
int8_t TSMART_XBEE_ZB_DiscoverNodes | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB, |
uint8_t | TSMART_XBEE_ZB_max_nodes, | ||
tsmart_xbee_zb_discovered_node_t * | TSMART_XBEE_ZB_discovered_node, | ||
uint8_t | TSMART_XBEE_ZB_Timeout | ||
) |
Node Discovery Timeout.
Sets the node discovery timeout and when is executed, the node discovery timeout value is included in the transmission to provide all remote devices with a response timeout. Remote devices wait a random time, less than node discovery timeout, before sending their response.
TSMART_XBEE_ZB | XBee ZigBee structure handler. |
TSMART_XBEE_ZB_max_nodes | Maximum number of nodes to search. |
TSMART_XBEE_ZB_discovered_node | Discovered node structure. |
TSMART_XBEE_ZB_Timeout | Node discovery timeout value [0x20 - 0xFF [x 100 msec]]. |
int8_t TSMART_XBEE_ZB_HWSleep | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB, |
tsmart_xbee_zb_flag_t | TSMART_XBEE_ZB_flag | ||
) |
Hardware Sleep.
Provides to enter/exit to sleep mode using a dedicated line, RQ Pin.
TSMART_XBEE_ZB | XBee ZB structure handler. |
TSMART_XBEE_ZB_flag | Flag to enter/exit sleep mode. |
int8_t TSMART_XBEE_ZB_Init | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB, |
tsmart_xbee_zb_config_t * | TSMART_XBEE_ZB_config | ||
) |
Initialize the XBee module.
This functions initializes the hardware configuration of the selected XBee and the associated OS mechanisms.
TSMART_XBEE_ZB | XBee ZigBee structure handler. |
TSMART_XBEE_ZB_config | Indicates the Baud rate for the microcontroller's UART, enables/disables flow control and priority reception task. |
int8_t TSMART_XBEE_ZB_InitStructCoordinator | ( | tsmart_xbee_zb_config_device_t * | TSMART_XBEE_ZB_config_device | ) |
Default configuration function for coordinator.
This function shall be called before configure the XBee ZigBee coordinator module to make sure having a good configuration for XBee module. Check default values in tsmart_xbee_zb_config_device_t definition
TSMART_XBEE_ZB_config_device | Configuration device structure. It shall be empty. |
int8_t TSMART_XBEE_ZB_InitStructEndDevice | ( | tsmart_xbee_zb_config_device_t * | TSMART_XBEE_ZB_config_device | ) |
Default configuration function for end device.
This function shall be called before configure the XBee ZigBee end device module to make sure having a good configuration for XBee module. Check default values in tsmart_xbee_zb_config_device_t definition
TSMART_XBEE_ZB_config_device | Configuration device structure. It shall be empty. |
int8_t TSMART_XBEE_ZB_InitStructRouter | ( | tsmart_xbee_zb_config_device_t * | TSMART_XBEE_ZB_config_device | ) |
Default configuration function for router.
This function shall be called before configure the XBee zigbee router module to make sure having a good configuration for Xbee module. Check default values in tsmart_xbee_zb_config_device_t definition
TSMART_XBEE_ZB_config_device | Configuration device structure. It shall be empty. |
int8_t TSMART_XBEE_ZB_NetworkReset | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB, |
tsmart_xbee_zb_rts_network_type | TSMART_XBEE_ZB_type | ||
) |
Network reset.
Reset network layer parameters on one or more modules within a PAN. All network configuration and routing information is consequently lost. Two types of reset:
TSMART_XBEE_ZB | XBee structure handler. |
TSMART_XBEE_ZB_type | Type of reset: TSMART_XBEE_ZB_RST_NETWORK_TYPE1 or TSMART_XBEE_ZB_RST_NETWORK_TYPE2. |
int8_t TSMART_XBEE_ZB_NumberRemainingChildren | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB | ) |
Number of Remaining Children.
Reports about how many child can be joined to the router or coordinator
TSMART_XBEE_ZB | XBee structure handler. |
int8_t TSMART_XBEE_ZB_PowerSignalReceived | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB | ) |
Reports the RF power signal (RSSI) of last received packet.
TSMART_XBEE_ZB | XBee ZB structure handler. |
uint32_t TSMART_XBEE_ZB_ReadHighAddress | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB | ) |
Reads the high XBee address.
TSMART_XBEE_ZB | XBee ZB structure handler. |
uint32_t TSMART_XBEE_ZB_ReadLowAddress | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB | ) |
Reads the low XBee address.
TSMART_XBEE_ZB | XBee ZB structure handler. |
uint16_t TSMART_XBEE_ZB_ReadNetworkAddress | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB | ) |
Reads the MY XBee address.
TSMART_XBEE_ZB | XBee ZB structure handler. |
tsmart_xbee_zb_status_message_t TSMART_XBEE_ZB_ReadSatus | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB, |
portTickType | TSMART_XBEE_ZB_timeout | ||
) |
Reads 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_ZB | XBee ZB structure handler. |
TSMART_XBEE_ZB_timeout | Maximum waiting timeout. |
@arg TSMART_XBEE_ZB_HARDWARE_RESET - Hardware reset @arg TSMART_XBEE_ZB_WATCHDOG_TIMER_RESET - Watchdog timer reset @arg TSMART_XBEE_ZB_JOINED_NETWORK - Joined network (routers and end devices) @arg TSMART_XBEE_ZB_DISASSOCIATED - Disassociated @arg TSMART_XBEE_ZB_COORDINATOR_STARTED - Coordinator started @arg TSMART_XBEE_ZB_NETWORK_SECURITY_KEY_WAS_UPDATED - Network security key was updated @arg TSMART_XBEE_ZB_VOLTAGE_SUPPLY_LIMIT_EXCEEDED - Voltage supply limit exceeded (PRO S2B only) @arg TSMART_XBEE_ZB_MODEM_CONFIGURATION_CHANGED_WHILE_JOIN_IN_PROGRESS - Modem configuration changed while join in progress @arg TSMART_XBEE_ZB_STACK_ERROR - Stack error @arg TSMART_XBEE_ZB_WRONG_ANSWER - Failure
int32_t TSMART_XBEE_ZB_ReceiveApiFrame | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB, |
tsmart_xbee_zb_data_received_t * | TSMART_XBEE_ZB_data, | ||
portTickType | TSMART_XBEE_ZB_xticks | ||
) |
Receives ZigBee API frame.
TSMART_XBEE_ZB | XBee ZB structure handler. |
TSMART_XBEE_ZB_data | Data structure to store data. |
TSMART_XBEE_ZB_xticks | Maximum waiting timeout. |
tsmart_xbee_zb_tx_status_t TSMART_XBEE_ZB_SendApiFrame | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB, |
tsmart_xbee_zb_data_to_send_t * | TSMART_XBEE_ZB_data, | ||
portTickType | TSMART_XBEE_ZB_xticks | ||
) |
Sends a ZigBee API frame.
This function can wait for ACK(id different than 0), this can delay the sent but ensures it.
TSMART_XBEE_ZB | XBee ZigBee structure handler. |
TSMART_XBEE_ZB_data | Data buffer to send. |
TSMART_XBEE_ZB_xticks | Maximum waiting timeout. |
int8_t TSMART_XBEE_ZB_SendAtCommandApiConfiguration | ( | tsmart_xbee_zb_t * | TSMART_XBEE_ZB, |
uint8_t * | TSMART_XBEE_ZB_answer_buffer, | ||
uint8_t | TSMART_XBEE_ZB_frame_id, | ||
uint8_t * | TSMART_XBEE_ZB_payload, | ||
uint8_t | TSMART_XBEE_ZB_payload_size, | ||
portTickType | TSMART_XBEE_ZB_timeout | ||
) |
Sends a configuration command.
This function sends configuration command and returns a semi-answer API frame, user must know the structure of the API frame received because not returns the complete API frame, the checksum, length and start flag field are processed and remove form the frame, the rest of the frame has the same fields and the same order in the API frame.
TSMART_XBEE_ZB | XBee ZigBee structure handler. |
TSMART_XBEE_ZB_answer_buffer | Data buffer received. |
TSMART_XBEE_ZB_frame_id | ID frame for API frame. |
TSMART_XBEE_ZB_payload | Payload. |
TSMART_XBEE_ZB_payload_size | Payload size. |
TSMART_XBEE_ZB_timeout | Maximum waiting timeout. |