Microcontroller Wireless Solutions


ZigBee Remote Control (ZRC) Profile API Functions

Data Structures

struct  zrc_indication_callback

Typedefs

typedef struct
zrc_indication_callback 
zrc_indication_callback_t

Functions

char * zrc_print_rc_cmd_text (uint8_t command)
 Prints RC command code text; used for example apps and debugging.
bool zrc_cmd_request (uint8_t PairingRef, uint16_t VendorId, zrc_cmd_code_t CmdCode, uint8_t CmdLength, uint8_t *Cmd, uint8_t TxOptions, FUNC_PTR confirm_cb)
 Initialites the command transmission from the application.
void zrc_cmd_confirm (nwk_enum_t Status, uint8_t PairingRef, cec_code_t RcCmd)
 Callback function to the application indicating the status the sent ZRC command request.
void zrc_cmd_indication (uint8_t PairingRef, uint8_t nsduLength, uint8_t *nsdu, uint8_t RxLinkQuality, uint8_t RxFlags)
 API indicating a received the command to ZRC application.
void register_zrc_indication_callback (zrc_indication_callback_t *zrc_ind_callback)
 Registering zrc indication callback.

Detailed Description

With this group of functions, the stack provides the API functions that handle functionality defined by the ZRC profile specification. API functions provide access to command handling functionality.
There are two implementation supported for ZRC. First is the basic one, only PRESSED commands are supported on target and controller. For this implementation, compiler switch 'ZRC_BASIC_PRESS_ONLY' is used. The other implementation is a full feature implementation, that uses the REPEATED and RELEASED features of ZRC profile. This is the default implementation.


Typedef Documentation

struct for zrc indication callback. App should use this struct to register indication callback functions


Function Documentation

void register_zrc_indication_callback ( zrc_indication_callback_t zrc_ind_callback)

Registering zrc indication callback.

The application needs to register the zrc indication call back functions so that the corresponding indication function will get called by the profile on receiving the indication from the network layer.

Parameters:
zrc_indication_callback_tindication callback struct
See also:
zrc_indication_callback_t
void zrc_cmd_confirm ( nwk_enum_t  Status,
uint8_t  PairingRef,
cec_code_t  RcCmd 
)

Callback function to the application indicating the status the sent ZRC command request.

Parameters:
StatusStatus of the command request
PairingRefPairing reference
RcCmdRC command code.
void zrc_cmd_indication ( uint8_t  PairingRef,
uint8_t  nsduLength,
uint8_t *  nsdu,
uint8_t  RxLinkQuality,
uint8_t  RxFlags 
)

API indicating a received the command to ZRC application.

Parameters:
PairingRefPairing reference of the source node
nsduLengthLength of the received data
nsduPointer to payload data, i.e. RC command
RxLinkQualityLink quality of received packet
RxFlagsRx Flags.
bool zrc_cmd_request ( uint8_t  PairingRef,
uint16_t  VendorId,
zrc_cmd_code_t  CmdCode,
uint8_t  CmdLength,
uint8_t *  Cmd,
uint8_t  TxOptions,
FUNC_PTR  confirm_cb 
)

Initialites the command transmission from the application.

Parameters:
PairingRefPairing reference
VendorIdVendor Id information
CmdCodeZRC cmd code (Press/Release)
CmdLengthLength of the rc cmd (rc cmd code + Payload)
CmdPointer to payload data, i.e. RC command; rc command code (rc cmd code + Payload)
TxOptionsTransmission options (Eg. ack, security etc)
confirm_cbCall back pointer for the confirmation
Returns:
true returns the status of zrc_cmd_request.
char* zrc_print_rc_cmd_text ( uint8_t  command)

Prints RC command code text; used for example apps and debugging.

Parameters:
commandCEC command code
Returns:
String describing the command