aps.h File Reference

The header file describes the public APS interface and APS types. More...

#include <types.h>
#include <nwk.h>
#include <appFramework.h>
#include <macAddr.h>

Go to the source code of this file.

Data Structures

struct  APS_Address_t
 Common APS Address type. More...
struct  APS_AibPermissionsConfiguration_t
 APS SubLayer Constants. More...
union  APS_AibAttribute_t
 Types of parameters which can be set to the APS AIB. More...
struct  APS_DataConf_t
 Parameters structure of the APS_DataReq_t::APS_DataConf() function. The APSDE-DATA.confirm primitive. More...
struct  APS_TxOptions_t
 Describes the options of data transmission. More...
struct  APS_DataReq_t
 Parameters structure of the APS_DataReq() function. The APSDE-DATA.request primitive. More...
struct  APS_DataInd_t
 Parameters structure of the APS_RegisterEndpointReq_t::APS_DataInd() function The function is determined by certain End Point. The APSDE-DATA.indication primitive. More...
struct  APS_GetConf_t
 Parameters structure of the APS_GetConf() function. The APSME-GET.confirm primitive. More...
struct  APS_GetReq_t
 Parameters structure of the APS_GetReq() function. The APSME-GET.request primitive. More...
struct  APS_SetConf_t
 Parameters structure of the APS_SetConf() function The APSME-SET.confirm primitive. More...
struct  APS_SetReq_t
 Parameters structure of the APS_SetReq() function The APSME-SET.request primitive. More...
struct  APS_AddGroupConf_t
 Parameters structure of the APS_AddGroupConf() function. The APSME-ADD-GROUP.confirm primitive. More...
struct  APS_AddGroupReq_t
 Parameters structure of the APS_AddGroupReq() function. The APSME-ADD-GROUP.request primitive. More...
struct  APS_RemoveGroupConf_t
 Parameters structure of the APS_RemoveGroupConf() function. The APSME-REMOVE-GROUP.confirm primitive. More...
struct  APS_RemoveGroupReq_t
 Parameters structure of the APS_RemoveGroupReq() function. The APSME-REMOVE-GROUP.request primitive. More...
struct  APS_RemoveAllGroupsConf_t
 Parameters structure of the APS_RemoveAllGroupsConf() function. The APSME-REMOVE-ALL-GROUPS.confirm primitive. More...
struct  APS_RemoveAllGroupsReq_t
 Parameters structure of the APS_RemoveAllGroupsReq() function. The APSME-REMOVE-ALL-GROUPS.request primitive. More...
struct  APS_RegisterEndpointReq_t
 Parameters structure of the APS_RegisterEndpointReq() function. APSME-REGISTER-ENDPOINT.request primitive. More...
struct  APS_UnregisterEndpointReq_t
 Parameters structure of the APS_UnregisterEndpointReq() function. APSME-UNREGISTER-ENDPOINT.request primitive. More...

Defines

#define APS_MAX_DATA_FRAME_HEADER_LENGTH   12
 Max APS header size.
#define APS_MAX_DATA_FRAME_FOOTER_LENGTH   0
 Max APS footer size.
#define APS_MAX_ASDU_SIZE   (NWK_MAX_NSDU_SIZE - APS_MAX_DATA_FRAME_HEADER_LENGTH - APS_MAX_DATA_FRAME_FOOTER_LENGTH)
 Max size of APS payload.
#define APS_ASDU_OFFSET   (NWK_NSDU_OFFSET + APS_MAX_DATA_FRAME_HEADER_LENGTH)
 Size of the reserved header in the data frame.
#define APS_AFFIX_LENGTH   (APS_MAX_DATA_FRAME_HEADER_LENGTH + APS_MAX_DATA_FRAME_FOOTER_LENGTH + NWK_AFFIX_LENGTH)
 Size of the reserved part in the data frame.
#define APS_BROADCAST_ENDPOINT   0xff
 APS Broadcast Endpoint.
#define APS_MIN_USER_ENDPOINT   0x01
 Min user endpoint number.
#define APS_MAX_USER_ENDPOINT   0xf0
 Max user endpoint number.

Enumerations

enum  APS_AddrMode_t { APS_NO_ADDRESS = 0x00, APS_GROUP_ADDRESS = 0x01, APS_SHORT_ADDRESS = 0x02, APS_EXT_ADDRESS = 0x03 }
 APS addressing modes. More...
enum  APS_Status_t {
  APS_SUCCESS_STATUS = 0x00, APS_ASDU_TOO_LONG_STATUS = 0xa0, APS_DEFRAG_DEFERRED_STATUS = 0xa1, APS_DEFRAG_UNSUPPORTED_STATUS = 0xa2,
  APS_ILLEGAL_REQUEST_STATUS = 0xa3, APS_INVALID_BINDING_STATUS = 0xa4, APS_INVALID_GROUP_STATUS = 0xa5, APS_INVALID_PARAMETER_STATUS = 0xa6,
  APS_NO_ACK_STATUS = 0xa7, APS_NO_BOUND_DEVICE_STATUS = 0xa8, APS_NO_SHORT_ADDRESS_STATUS = 0xa9, APS_NOT_SUPPORTED_STATUS = 0xaa,
  APS_SECURED_LINK_KEY_STATUS = 0xab, APS_SECURED_NWK_KEY_STATUS = 0xac, APS_SECURITY_FAIL_STATUS = 0xad, APS_TABLE_FULL_STATUS = 0xae,
  APS_UNSECURED_STATUS = 0xaf, APS_UNSUPPORTED_ATTRIBUTE_STATUS = 0xb0, APS_NOT_INDICATED_STATUS = 0xb1
}
 APS status values. More...
enum  APS_SkkeStatus_t {
  APS_SKKE_SUCCESS_STATUS = 0x00, APS_SKKE_INVALID_PARAMETER_STATUS = 0x01, APS_SKKE_NO_MASTER_KEY_STATUS = 0x02, APS_SKKE_INVALID_CHALLENGE_STATUS = 0x03,
  APS_SKKE_INVALID_SKG_STATUS = 0x04, APS_SKKE_INVALID_MAC_STATUS = 0x05, APS_SKKE_INVALID_KEY_STATUS = 0x06, APS_SKKE_TIMEOUT_STATUS = 0x07,
  APS_SKKE_BAD_FRAME_STATUS = 0x08
}
 APS SKKE status values. More...
enum  APS_AibAttributeId_t {
  APS_AIB_BINDING_TABLE = 0xc1, APS_AIB_DESIGNATED_COORDINATOR = 0xc2, APS_AIB_CHANNEL_MASK = 0xc3, APS_AIB_USE_EXTENDED_PANID = 0xc4,
  APS_AIB_GROUP_TABLE = 0xc5, APS_AIB_NONMEMBER_RADIUS = 0xc6, APS_AIB_PERMISSIONS_CONFIGURATION = 0xc7, APS_AIB_USE_INSECURE_JOIN = 0xc8,
  APS_AIB_INTERFRAME_DELAY = 0xc9, APS_AIB_DEVICE_KEY_PAIR_SET = 0xaa, APS_AIB_TRUST_CENTER_ADDRESS = 0xab, APS_AIB_SECURITY_TIME_OUT_PERIOD = 0xac
}
 APS Information base attributes IDs. More...

Functions

void APS_GetReq (APS_GetReq_t *req)
 Gets a parameter from AIB.
void APS_SetReq (APS_SetReq_t *req)
 Sets a parameter to AIB.
void APS_RegisterEndpointReq (APS_RegisterEndpointReq_t *req)
 Registers endpoint to APS.
void APS_UnregisterEndpointReq (APS_UnregisterEndpointReq_t *req)
 Unregisters endPoint from APS.
APS_RegisterEndpointReq_tAPS_GetEndpointList (void)
 Returns the pointer to APS EndPointList.
void APS_StopEndpointIndication (Endpoint_t endpoint)
 Stops APS Data indications of specific endpoint number.
void APS_ResumeEndpointIndication (Endpoint_t endpoint)
 Resumes APS Data indications of specific endpoint number.
void APS_DataReq (APS_DataReq_t *req)
 Sends data to a node of a network.
void APS_AddGroupReq (APS_AddGroupReq_t *req)
 Adds a group to APS.
void APS_RemoveGroupReq (APS_RemoveGroupReq_t *req)
 Removes a group from APS.
void APS_RemoveAllGroupsReq (APS_RemoveAllGroupsReq_t *req)
 Removes all groups from APS.
void APS_CalculateTimes (void)


Detailed Description

The header file describes the public APS interface and APS types.

Author:
Atmel Corporation: http://www.atmel.com
Support email: avr@atmel.com
Copyright (c) 2008 , Atmel Corporation. All rights reserved. Licensed under Atmel's Limited License Agreement (BitCloudTM).

Definition in file aps.h.


Define Documentation

#define APS_MAX_DATA_FRAME_HEADER_LENGTH   12

Max APS header size.

Definition at line 50 of file aps.h.

#define APS_MAX_DATA_FRAME_FOOTER_LENGTH   0

Max APS footer size.

Definition at line 55 of file aps.h.

#define APS_MAX_ASDU_SIZE   (NWK_MAX_NSDU_SIZE - APS_MAX_DATA_FRAME_HEADER_LENGTH - APS_MAX_DATA_FRAME_FOOTER_LENGTH)

Max size of APS payload.

Definition at line 71 of file aps.h.

#define APS_ASDU_OFFSET   (NWK_NSDU_OFFSET + APS_MAX_DATA_FRAME_HEADER_LENGTH)

Size of the reserved header in the data frame.

Definition at line 76 of file aps.h.

#define APS_AFFIX_LENGTH   (APS_MAX_DATA_FRAME_HEADER_LENGTH + APS_MAX_DATA_FRAME_FOOTER_LENGTH + NWK_AFFIX_LENGTH)

Size of the reserved part in the data frame.

Definition at line 81 of file aps.h.

#define APS_BROADCAST_ENDPOINT   0xff

APS Broadcast Endpoint.

Definition at line 86 of file aps.h.

#define APS_MIN_USER_ENDPOINT   0x01

Min user endpoint number.

Definition at line 91 of file aps.h.

#define APS_MAX_USER_ENDPOINT   0xf0

Max user endpoint number.

Definition at line 96 of file aps.h.


Enumeration Type Documentation

enum APS_AddrMode_t

APS addressing modes.

Address mode is used in some of APS primitives

Defines APS addressing modes used in some standard primitives

Enumerator:
APS_NO_ADDRESS  Indirect addressing mode via binding future.
APS_GROUP_ADDRESS  Group addressing mode via multicast.
APS_SHORT_ADDRESS  Unicast addressing mode by 16-bit network address.
APS_EXT_ADDRESS  Unicast addressing mode by 64-bit IEEE address.

Definition at line 145 of file aps.h.

enum APS_Status_t

APS status values.

Status values in some of the APS primitives

APS status values used in the most part of standard primives except for the security service primitives where APS_SecurityStatus_t is used instead

Enumerator:
APS_SUCCESS_STATUS  SUCCESS.
APS_ASDU_TOO_LONG_STATUS  ASDU_TOO_LONG.
APS_DEFRAG_DEFERRED_STATUS  DEFRAG_DEFERRED.
APS_DEFRAG_UNSUPPORTED_STATUS  DEFRAG_UNSUPPORTED.
APS_ILLEGAL_REQUEST_STATUS  ILLEGAL_REQUEST.
APS_INVALID_BINDING_STATUS  INVALID_BINDING.
APS_INVALID_GROUP_STATUS  INVALID_GROUP.
APS_INVALID_PARAMETER_STATUS  INVALID_PARAMETER.
APS_NO_ACK_STATUS  NO_ACK.
APS_NO_BOUND_DEVICE_STATUS  NO_BOUND_DEVICE.
APS_NO_SHORT_ADDRESS_STATUS  NO_SHORT_ADDRESS.
APS_NOT_SUPPORTED_STATUS  NOT_SUPPORTED.
APS_SECURED_LINK_KEY_STATUS  SECURED_LINK_KEY.
APS_SECURED_NWK_KEY_STATUS  SECURED_NWK_KEY.
APS_SECURITY_FAIL_STATUS  SECURITY_FAIL.
APS_TABLE_FULL_STATUS  TABLE_FULL.
APS_UNSECURED_STATUS  UNSECURED.
APS_UNSUPPORTED_ATTRIBUTE_STATUS  UNSUPPORTED_ATTRIBUTE.
APS_NOT_INDICATED_STATUS  NOT_INDICATED (nonstandard status value).

Definition at line 164 of file aps.h.

enum APS_SkkeStatus_t

APS SKKE status values.

Status values as result of SKKE protocol (APS Security)

APS SKKE status values used in APS Key Establishment mechanism

Enumerator:
APS_SKKE_SUCCESS_STATUS  SUCCESS.
APS_SKKE_INVALID_PARAMETER_STATUS  INVALID_PARAMETER.
APS_SKKE_NO_MASTER_KEY_STATUS  NO_MASTER_KEY.
APS_SKKE_INVALID_CHALLENGE_STATUS  INVALID_CHALLENGE.
APS_SKKE_INVALID_SKG_STATUS  INVALID_SKG.
APS_SKKE_INVALID_MAC_STATUS  INVALID_MAC.
APS_SKKE_INVALID_KEY_STATUS  INVALID_KEY.
APS_SKKE_TIMEOUT_STATUS  TIMEOUT.
APS_SKKE_BAD_FRAME_STATUS  BAD_FRAME.

Definition at line 199 of file aps.h.

enum APS_AibAttributeId_t

APS Information base attributes IDs.

AIB Attribute's ID definition

APS Information base attribute IDs used for AIB management with standard AIB maintenance primitives

Enumerator:
APS_AIB_BINDING_TABLE  apsBindingTable
APS_AIB_DESIGNATED_COORDINATOR  apsDesignatedCoordinator
APS_AIB_CHANNEL_MASK  apsChannelMask
APS_AIB_USE_EXTENDED_PANID  apsUseExtendedPANID
APS_AIB_GROUP_TABLE  apsGroupTable
APS_AIB_NONMEMBER_RADIUS  apsNonmemberRadius
APS_AIB_PERMISSIONS_CONFIGURATION  apsPermissionsConfiguration
APS_AIB_USE_INSECURE_JOIN  apsUseInsecureJoin
APS_AIB_INTERFRAME_DELAY  apsInterframeDelay
APS_AIB_DEVICE_KEY_PAIR_SET  apsDeviceKeyPairSet
APS_AIB_TRUST_CENTER_ADDRESS  apsTrustCenterAddress
APS_AIB_SECURITY_TIME_OUT_PERIOD  apsSecurityTimeOutPeriod

Definition at line 222 of file aps.h.


Function Documentation

void APS_GetReq ( APS_GetReq_t req  ) 

Gets a parameter from AIB.

Parameters:
[in] req The APSME-GET.request (APS_GetReq_t) primitive pointer.
Returns:
None.

void APS_SetReq ( APS_SetReq_t req  ) 

Sets a parameter to AIB.

Function returns the result of transaction via callback call with confirm (APS_SetConf_t) primitive pointer as parameter

Parameters:
[in] req The APSME-SET.request (APS_SetReq_t) primitive pointer.
Returns:
None.

void APS_RegisterEndpointReq ( APS_RegisterEndpointReq_t req  ) 

Registers endpoint to APS.

Parameters:
[in] req The register endpoint primitive pointer.
Returns:
None.

void APS_UnregisterEndpointReq ( APS_UnregisterEndpointReq_t req  ) 

Unregisters endPoint from APS.

Parameters:
[in] req The unregister endpoint primitive pointer.
Returns:
None.

APS_RegisterEndpointReq_t* APS_GetEndpointList ( void   ) 

Returns the pointer to APS EndPointList.

Returns:
Valid APS EndpointList pointer or NULL if there are no registered endpoints.

void APS_StopEndpointIndication ( Endpoint_t  endpoint  ) 

Stops APS Data indications of specific endpoint number.

Parameters:
[in] endpoint The registered endpoint number. The 0xff special value means all registered endpoints.
Returns:
None.

void APS_ResumeEndpointIndication ( Endpoint_t  endpoint  ) 

Resumes APS Data indications of specific endpoint number.

Parameters:
[in] endpoint The registered endpoint number. The 0xff special value means all registered endpoints.
Returns:
None.

void APS_DataReq ( APS_DataReq_t req  ) 

Sends data to a node of a network.

Unicast, broadcast, or multicast data can be sent by this function. Function returns the result of transaction via callback call with confirm (APS_DataConf_t) primitive pointer as parameter.

Parameters:
[in] req The APSDE-DATA.request (APS_DataReq_t) primitive pointer.
Returns:
None.

void APS_AddGroupReq ( APS_AddGroupReq_t req  ) 

Adds a group to APS.

This function adds the current device to the members of certain group. Function returns the result of transaction via callback call with confirm (APS_AddGroupConf_t) primitive pointer as parameter.

Parameters:
[in] req The APSME-ADD-GROUP.request (APS_AddGroupReq_t) primitive pointer.
Returns:
None.

void APS_RemoveGroupReq ( APS_RemoveGroupReq_t req  ) 

Removes a group from APS.

This function removes the current device from the members of certain group. Function returns the result of transaction via callback call with confirm (APS_RemoveGroupConf_t) primitive pointer as parameter.

Parameters:
[in] req The APSME-REMOVE-GROUP.request (APS_RemoveGroupReq_t) primitive pointer.
Returns:
None.

void APS_RemoveAllGroupsReq ( APS_RemoveAllGroupsReq_t req  ) 

Removes all groups from APS.

This function removes the current device from members of all groups. Function returns the result of transaction via callback call with confirm (APS_RemoveAllGroupsConf_t) primitive pointer as parameter.

Parameters:
[in] req The APSME-REMOVE-ALL-GROUPS.request (APS_RemoveAllGroupsReq_t) primitive pointer.
Returns:
None.

void APS_CalculateTimes ( void   ) 


Generated on Mon Feb 16 17:53:40 2009 for BitCloud Stack Documentation by  doxygen 1.5.1-p1