IQRF SPI library for Arduino  Version 1.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
IQRFPackets Class Reference

#include <IQRFPackets.h>

Public Types

enum  statuses { OK = 1, ERROR = 2 }
 

Public Member Functions

uint8_t send (uint8_t spiCmd, uint8_t *dataBuffer, uint8_t dataLength, uint8_t unallocationFlag)
 
void setId (uint8_t id)
 
uint8_t getId ()
 
void setIdCount (uint8_t count)
 
uint8_t getIdCount ()
 
void setLength (uint8_t length)
 
uint8_t getLength ()
 

Detailed Description

IQRF Packets

Member Enumeration Documentation

Tx packet statuses

Enumerator
OK 

Packet sent OK.

ERROR 

Packet sent with ERROR.

Member Function Documentation

uint8_t IQRFPackets::getId ( )

Get actual Tx packet ID

Returns
Actual Tx packet ID
uint8_t IQRFPackets::getIdCount ( )

Get count of packet IDs

Returns
Count of packet IDs
uint8_t IQRFPackets::getLength ( )

Get packet lenght

Returns
Packet length
uint8_t IQRFPackets::send ( uint8_t  spiCmd,
uint8_t *  dataBuffer,
uint8_t  dataLength,
uint8_t  unallocationFlag 
)

Prepare SPI packet to packet buffer

Parameters
spiCmdCommand that I want to send to TR module
dataBufferPointer to a buffer that contains data that I want to send to TR module
dataLengthNumber of bytes to send
unallocationFlagIf the dataBuffer is dynamically allocated using malloc function. If you wish to unallocate buffer after data is sent, set the unallocationFlag to 1, otherwise to 0.
Returns
Packet ID
void IQRFPackets::setId ( uint8_t  id)

Set actual Tx packet ID

Parameters
idActual Tx packet ID
void IQRFPackets::setIdCount ( uint8_t  count)

Set count of packet IDs

Parameters
countCount of packet IDs
void IQRFPackets::setLength ( uint8_t  length)

Set packet length

Parameters
lengthPacket length

The documentation for this class was generated from the following files: