Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
test15_4_evbme.c File Reference

test15_4 test integration functions More...

#include <stdio.h>
#include <string.h>
#include "cascoda-bm/cascoda_evbme.h"
#include "cascoda-bm/cascoda_serial.h"
#include "cascoda-bm/cascoda_spi.h"
#include "cascoda-bm/cascoda_types.h"
#include "cascoda-bm/test15_4_evbme.h"
#include "cascoda-util/cascoda_time.h"
#include "mac_messages.h"
#include "test15_4_phy_tests.h"
Include dependency graph for test15_4_evbme.c:

Functions

unsigned long test15_4_getms (void)
 Returns the current time. More...
 
void TEST15_4_Initialise (struct ca821x_dev *pDeviceRef)
 TEST15_4 Initialistion. More...
 
void TEST15_4_Handler (struct ca821x_dev *pDeviceRef)
 TEST15_4 Event Handler in Main Polling Loop. More...
 
int TEST15_4_UpStreamDispatch (struct SerialBuffer *SerialRxBuffer, struct ca821x_dev *pDeviceRef)
 Dispatch Branch for EVBME Request (UpStream, Serial) More...
 
u8_t EVBME_PHY_TESTMODE_request (u8_t TestMode, struct ca821x_dev *pDeviceRef)
 EVBME_PHY_TESTMODE_request according to EVBME Spec. More...
 
u8_t EVBME_PHY_SET_request (u8_t Parameter, u8_t ParameterLength, u8_t *ParameterValue)
 EVBME_PHY_SET_request according to EVBME Spec. More...
 
void EVBME_PHY_REPORT_request (void)
 EVBME_PHY_REPORT_request according to EVBME Spec. More...
 
void TEST15_4_SetupAwaitAssoc (uint8_t *pDeviceAddress, uint16_t AssocShortAddress, uint8_t Status)
 Set up Association Response when waiting for it. More...
 
void TEST15_4_SetupAwaitOrphan (uint8_t *pDeviceAddress, uint16_t OrphanShortAddress)
 Set up Orphan Response when waiting for it. More...
 
ca_error TEST15_4_AssociateIndication (struct MLME_ASSOCIATE_indication_pset *params, struct ca821x_dev *pDeviceRef)
 Callback for MLME_ASSOCIATE_indication. More...
 
ca_error TEST15_4_OrphanIndication (struct MLME_ORPHAN_indication_pset *params, struct ca821x_dev *pDeviceRef)
 Callback for MLME_ORPHAN_indication. More...
 
ca_error TEST15_4_PHY_RXPKT_indication (struct TDME_RXPKT_indication_pset *params, struct ca821x_dev *pDeviceRef)
 Callback for TDME_RXPKT_indication. More...
 
ca_error TEST15_4_MAC_RXPKT_indication (struct MCPS_DATA_indication_pset *params, struct ca821x_dev *pDeviceRef)
 Callback for MCPS_DATA_indication. More...
 
ca_error TEST15_4_MAC_TXPKT_confirm (struct MCPS_DATA_confirm_pset *params, struct ca821x_dev *pDeviceRef)
 Callback for MCPS_DATA_confirm. More...
 
ca_error TEST15_4_PHY_EDDET_indication (struct TDME_EDDET_indication_pset *params, struct ca821x_dev *pDeviceRef)
 Callback for TDME_EDDET_indication. More...
 
void TEST15_4_RegisterCallbacks (struct ca821x_dev *pDeviceRef)
 Dynamically Register Callbacks for TEST15_4. More...
 
int TEST15_4_SerialDispatch (uint8_t *buf, size_t len, struct ca821x_dev *pDeviceRef)
 Dispatch function to process received serial messages. More...
 

Variables

u8_t MAC_AWAITING_ASSOC_INDICATION = 0
 
u8_t MAC_AWAITING_ORPHAN_INDICATION = 0
 
uint8_t EVBME_AssocDeviceAddress [8] = {0, 0, 0, 0, 0, 0, 0, 0}
 
uint8_t EVBME_OrphanDeviceAddress [8] = {0, 0, 0, 0, 0, 0, 0, 0}
 
uint16_t EVBME_StoredAssocShortAddress
 
uint8_t EVBME_StoredAssocStatus
 
uint16_t EVBME_StoredOrphanShortAddress
 

Detailed Description

test15_4 test integration functions

Function Documentation

◆ EVBME_PHY_REPORT_request()

void EVBME_PHY_REPORT_request ( void  )

EVBME_PHY_REPORT_request according to EVBME Spec.

◆ EVBME_PHY_SET_request()

u8_t EVBME_PHY_SET_request ( u8_t  Parameter,
u8_t  ParameterLength,
u8_t ParameterValue 
)

EVBME_PHY_SET_request according to EVBME Spec.

Parameters
Parameter- Parameter Specifier
ParameterLength- Parameter Length
ParameterValue- Pointer to Parameter Value
Returns
EVBME Status

◆ EVBME_PHY_TESTMODE_request()

u8_t EVBME_PHY_TESTMODE_request ( u8_t  TestMode,
struct ca821x_dev pDeviceRef 
)

EVBME_PHY_TESTMODE_request according to EVBME Spec.

Parameters
TestMode- Test Mode
pDeviceRef- pointer to a CA-821x Device reference struct
Returns
EVBME Status

◆ TEST15_4_AssociateIndication()

ca_error TEST15_4_AssociateIndication ( struct MLME_ASSOCIATE_indication_pset params,
struct ca821x_dev pDeviceRef 
)

Callback for MLME_ASSOCIATE_indication.

◆ test15_4_getms()

unsigned long test15_4_getms ( void  )

Returns the current time.

Returns
ms since start of execution

◆ TEST15_4_Handler()

void TEST15_4_Handler ( struct ca821x_dev pDeviceRef)

TEST15_4 Event Handler in Main Polling Loop.

◆ TEST15_4_Initialise()

void TEST15_4_Initialise ( struct ca821x_dev pDeviceRef)

TEST15_4 Initialistion.

◆ TEST15_4_MAC_RXPKT_indication()

ca_error TEST15_4_MAC_RXPKT_indication ( struct MCPS_DATA_indication_pset params,
struct ca821x_dev pDeviceRef 
)

Callback for MCPS_DATA_indication.

◆ TEST15_4_MAC_TXPKT_confirm()

ca_error TEST15_4_MAC_TXPKT_confirm ( struct MCPS_DATA_confirm_pset params,
struct ca821x_dev pDeviceRef 
)

Callback for MCPS_DATA_confirm.

◆ TEST15_4_OrphanIndication()

ca_error TEST15_4_OrphanIndication ( struct MLME_ORPHAN_indication_pset params,
struct ca821x_dev pDeviceRef 
)

Callback for MLME_ORPHAN_indication.

◆ TEST15_4_PHY_EDDET_indication()

ca_error TEST15_4_PHY_EDDET_indication ( struct TDME_EDDET_indication_pset params,
struct ca821x_dev pDeviceRef 
)

Callback for TDME_EDDET_indication.

◆ TEST15_4_PHY_RXPKT_indication()

ca_error TEST15_4_PHY_RXPKT_indication ( struct TDME_RXPKT_indication_pset params,
struct ca821x_dev pDeviceRef 
)

Callback for TDME_RXPKT_indication.

◆ TEST15_4_RegisterCallbacks()

void TEST15_4_RegisterCallbacks ( struct ca821x_dev pDeviceRef)

Dynamically Register Callbacks for TEST15_4.

◆ TEST15_4_SerialDispatch()

int TEST15_4_SerialDispatch ( uint8_t *  buf,
size_t  len,
struct ca821x_dev pDeviceRef 
)

Dispatch function to process received serial messages.

Parameters
buf- serial buffer to dispatch
len- length of buf
pDeviceRef- pointer to a CA-821x Device reference struct
Returns
1: consumed by driver 0: command to be sent downstream to spi

◆ TEST15_4_SetupAwaitAssoc()

void TEST15_4_SetupAwaitAssoc ( uint8_t *  pDeviceAddress,
uint16_t  AssocShortAddress,
uint8_t  Status 
)

Set up Association Response when waiting for it.

Parameters
pDeviceAddress- IEEE address of device expected
AssocShortAddress- Short address for end device
Status- EVBME Status
Returns
-

◆ TEST15_4_SetupAwaitOrphan()

void TEST15_4_SetupAwaitOrphan ( uint8_t *  pDeviceAddress,
uint16_t  OrphanShortAddress 
)

Set up Orphan Response when waiting for it.

Parameters
pDeviceAddress- IEEE address of device expected
OrphanShortAddress- Short address of orphan
Returns
-

◆ TEST15_4_UpStreamDispatch()

int TEST15_4_UpStreamDispatch ( struct SerialBuffer SerialRxBuffer,
struct ca821x_dev pDeviceRef 
)

Dispatch Branch for EVBME Request (UpStream, Serial)

Variable Documentation

◆ EVBME_AssocDeviceAddress

uint8_t EVBME_AssocDeviceAddress[8] = {0, 0, 0, 0, 0, 0, 0, 0}

◆ EVBME_OrphanDeviceAddress

uint8_t EVBME_OrphanDeviceAddress[8] = {0, 0, 0, 0, 0, 0, 0, 0}

◆ EVBME_StoredAssocShortAddress

uint16_t EVBME_StoredAssocShortAddress

◆ EVBME_StoredAssocStatus

uint8_t EVBME_StoredAssocStatus

◆ EVBME_StoredOrphanShortAddress

uint16_t EVBME_StoredOrphanShortAddress

◆ MAC_AWAITING_ASSOC_INDICATION

u8_t MAC_AWAITING_ASSOC_INDICATION = 0

◆ MAC_AWAITING_ORPHAN_INDICATION

u8_t MAC_AWAITING_ORPHAN_INDICATION = 0