SZSPTP ez430-RF2480 1.0

ZigBee Sensor Network with synchronized time and time-stamped measurements.
Simple API interface
+ Collaboration diagram for Simple API interface:

Functions

UInt8 ccai_s_zb_app_register_request (UInt8 appEndPoint, UInt16 appProfileId, UInt16 DeviCeId, UInt8 DeviceVersion, UInt8 inputCommandsNum, char *InputCommandsList, UInt8 OutputCommandsNum, char *OutputCommandsList)
 Application register request. More...
 
UInt8 ccai_s_zb_start_request ()
 Start request. More...
 
UInt8 ccai_s_zb_permit_joining_request (UInt16 destination, UInt8 timeOut)
 Permit join change request. More...
 
UInt8 ccai_s_zb_bind_device (UInt8 create, UInt16 commandId, uint64_t destination)
 Bind device request. More...
 
UInt8 ccai_s_zb_allow_bind (UInt8 timeout)
 Allow bind request. More...
 
UInt8 ccai_s_zb_send_data_request (UInt16 destination, UInt16 commandId, UInt8 handle, UInt8 ack, UInt8 radius, UInt8 len, void *data)
 Send data request. More...
 
UInt8 ccai_s_zb_send_data_request_begin (UInt16 destination, UInt16 commandId, UInt8 handle, UInt8 ack, UInt8 radius, UInt8 len)
 Begin request to send data. More...
 
UInt8 ccai_s_zb_send_data_request_payload (UInt8 len, void *pBuf)
 Append data to the payload of send data request. More...
 
void ccai_s_zb_send_data_request_end (UInt8 forwardToSerial)
 Terminate the request to send data and send it to CC2480. More...
 
UInt8 ccai_s_zb_get_device_info (UInt8 param)
 Get device information request. More...
 
UInt8 ccai_s_zb_find_device_request (uint64_t searchKey)
 Find device request. More...
 

Detailed Description

Function Documentation

UInt8 ccai_s_zb_allow_bind ( UInt8  timeout)

Allow bind request.

Request to put CC2480 in allow binding mode.

Parameters
[in]timeoutTime (s) to stay in allow bind mode.
Returns
1 if sent, 0 if fail (fail if SPI is busy).

Definition at line 1466 of file cc2480ai.c.

References spi_reqBegin(), spi_reqData(), and spi_reqEnd().

Referenced by nwk_allow_bind().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt8 ccai_s_zb_app_register_request ( UInt8  appEndPoint,
UInt16  appProfileId,
UInt16  DeviceId,
UInt8  DeviceVersion,
UInt8  inputCommandsNum,
char *  InputCommandsList,
UInt8  OutputCommandsNum,
char *  OutputCommandsList 
)

Application register request.

Request to register the application with the CC2480 device.

Parameters
[in]appEndPointEndpoint of the device, range 1 to 240, one value to the network.
[in]appProfileIdProfile id, one value to the network, assigned by ZigBee Aliance.
[in]DeviceIdApp-specific, device type.
[in]DeviceVersionApp-specific, version of the device.
[in]inputCommandsNumNumber of input commands.
[in]InputCommandsListList of input commands.
[in]OutputCommandsNumNumber of output commands.
[in]OutputCommandsListList of output commands.
Returns
1 if sent, 0 if fail (fail if SPI is busy).

Definition at line 1301 of file cc2480ai.c.

References spi_reqBegin(), spi_reqData(), and spi_reqEnd().

Referenced by nwk_register().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt8 ccai_s_zb_bind_device ( UInt8  create,
UInt16  commandId,
uint64_t  destination 
)

Bind device request.

Request to create or delete a binding to another device on the network.

Parameters
[in]create1 to create a binding, 0 to remove.
[in]commandIdIdentifier of the bind.
[in]destination64-bit IEEE address of the device to bind to, set to 0 if unknown and destination device is set to allow bind mode.
Returns
1 if sent, 0 if fail (fail if SPI is busy).

Definition at line 1421 of file cc2480ai.c.

References spi_reqBegin(), spi_reqData(), and spi_reqEnd().

Referenced by nwk_bind_device().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt8 ccai_s_zb_find_device_request ( uint64_t  searchKey)

Find device request.

Request to determine the short address for a device in the network.

Parameters
[in]searchKeyValue to search on.
Returns
1 if sent, 0 if fail (fail if SPI is busy).

Definition at line 1684 of file cc2480ai.c.

References spi_reqBegin(), spi_reqData(), and spi_reqEnd().

+ Here is the call graph for this function:

UInt8 ccai_s_zb_get_device_info ( UInt8  param)

Get device information request.

Request to read a device information property.

Parameters
[in]paramIdentifier of the device information.
Returns
1 if sent, 0 if fail (fail if SPI is busy).

Definition at line 1653 of file cc2480ai.c.

References spi_reqBegin(), spi_reqData(), and spi_reqEnd().

Referenced by nwk_getDeviceInfo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt8 ccai_s_zb_permit_joining_request ( UInt16  destination,
UInt8  timeOut 
)

Permit join change request.

Request to change the joining permissions.

Parameters
[in]destinationAddress of device for which the join permissions should be set, 0xFFFC is for all routers and coordinator.
[in]timeOutAmount of time join permissions is turned on, 0 to disable joining permissions, 0xFF to enable permissions indefinitely.
Returns
1 if sent, 0 if fail (fail if SPI is busy).

Definition at line 1386 of file cc2480ai.c.

References spi_reqBegin(), spi_reqData(), and spi_reqEnd().

Referenced by nwk_setPermitJoin().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt8 ccai_s_zb_send_data_request ( UInt16  destination,
UInt16  commandId,
UInt8  handle,
UInt8  ack,
UInt8  radius,
UInt8  len,
void *  pBuf 
)

Send data request.

Request to transmit data to another device.

Parameters
[in]destinationDestination short address: 0 - 0xFFF7: a device; 0xFFFC: all routers and coordinator; 0xFFFD: all devices with receiver turned on; 0xFFFE destination determined from binding table; 0xFFFF: broadcast to all devices on the network.
[in]commandIdCommand id, if binding address is used, indicates the binding to use.
[in]handleUsed to identify the request.
[in]ack1 to request ACK from destination, 0 to not.
[in]radiusMax number of hops before packet is dropped.
[in]lenSize of the data buffer.
[in]pBufPointer to the data buffer.
Returns
1 if sent, 0 if fail (fail if SPI is busy).

Definition at line 1517 of file cc2480ai.c.

References spi_reqBegin(), spi_reqData(), and spi_reqEnd().

+ Here is the call graph for this function:

UInt8 ccai_s_zb_send_data_request_begin ( UInt16  destination,
UInt16  commandId,
UInt8  handle,
UInt8  ack,
UInt8  radius,
UInt8  len 
)

Begin request to send data.

Begin a request to send data, the data, if any, is sent with the function ccai_s_zb_send_data_request_payload and the request must be terminated by a call to ccai_s_zb_send_data_request_end.

Parameters
[in]destinationDestination short address: 0 - 0xFFF7: a device; 0xFFFC: all routers and coordinator; 0xFFFD: all devices with receiver turned on; 0xFFFE destination determined from binding table; 0xFFFF: broadcast to all devices on the network.
[in]commandIdCommand id, if binding address is used, indicates the binding to use.
[in]handleUsed to identify the request.
[in]ack1 to request ACK from destination, 0 to not.
[in]radiusMax number of hops before packet is dropped.
[in]lenSize of the data buffer.
Returns
1 if sent, 0 if fail (fail if SPI is busy).

Definition at line 1557 of file cc2480ai.c.

References spi_reqBegin(), and spi_reqData().

Referenced by nwk_startFrame().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ccai_s_zb_send_data_request_end ( UInt8  forwardToSerial)

Terminate the request to send data and send it to CC2480.

Terminate the send data request and sends the data. The request must be started previously by ccai_s_zb_send_data_request_begin and the data, if any, already filled by ccai_s_zb_send_data_request_payload.

Parameters
[in]forwardToSerialForward request to serial: 1 to forward the request to the serial port, 0 to don't.

Definition at line 1604 of file cc2480ai.c.

References spi_reqEnd().

Referenced by nwk_endFrame().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt8 ccai_s_zb_send_data_request_payload ( UInt8  len,
void *  pBuf 
)

Append data to the payload of send data request.

This function appends data to the payload of the send data request. The request must be started previously by ccai_s_zb_send_data_request_begin and after all data is appended, terminated by ccai_s_zb_send_data_request_end.

Parameters
[in]lenSize of the data buffer.
[in]pBufPointer to the data buffer.
Returns
1 if sent, 0 if fail (fail if not enough space to send all data).

Definition at line 1588 of file cc2480ai.c.

References spi_reqData().

Referenced by nwk_snd().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

UInt8 ccai_s_zb_start_request ( )

Start request.

Request to start the ZigBee stack.

Returns
1 if sent, 0 if fail (fail if SPI is busy).

Definition at line 1342 of file cc2480ai.c.

References spi_reqBegin(), and spi_reqEnd().

Referenced by nwk_start().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: