Bio Radio SDK - Xamarin Android
GLNeuroTech.Devices.Common.TransportLayer.DeviceDataPacket Class Reference

Device data packet Class. More...

Public Types

enum  DeviceCommand {
  DeviceCommand.NegativeAck = 0x00, DeviceCommand.SetMode = 0x20, DeviceCommand.GetMode = 0x30, DeviceCommand.SetParam = 0x40,
  DeviceCommand.GetParam = 0x50, DeviceCommand.SetState = 0x60, DeviceCommand.PacketLength = 0x70, DeviceCommand.WriteEEProm = 0x80,
  DeviceCommand.ReadEEProm = 0x90, DeviceCommand.TransmitData = 0xA0, DeviceCommand.ReceiveData = 0xB0, DeviceCommand.MiscData = 0xC0,
  DeviceCommand.PassThroughCommand = 0xD0, DeviceCommand.GetGlobal = 0xF0
}
 Device Command options. More...
 

Public Member Functions

 DeviceDataPacket (DeviceCommand command, byte[] data)
 Device data packet constructor. param: device command and data. More...
 
 DeviceDataPacket (DeviceCommand command, byte[] data, bool isResponse)
 Device data packet constructor - param: device command, data and isResponce. More...
 
 DeviceDataPacket (DeviceDataPacket otherPacket)
 Device data packet constructor - param: device data packet. More...
 
 DeviceDataPacket ()
 Device data packet constructor - no parameters. More...
 

Static Public Member Functions

static DeviceDataPacket CreateResponsePacket (DeviceDataPacket packet, int responseLength)
 Create response packet. More...
 

Static Public Attributes

static DeviceDataPacket Nack
 

Properties

int Length [get]
 Length property. More...
 
byte [] Data [get, set]
 Data property. More...
 
DeviceCommand Command [get, set]
 Command property. More...
 
bool IsResponsePacket [get, set]
 Is response packet property. More...
 

Detailed Description

Device data packet Class.

Member Enumeration Documentation

◆ DeviceCommand

Device Command options.

Enumerator
NegativeAck 
SetMode 
GetMode 
SetParam 
GetParam 
SetState 
PacketLength 
WriteEEProm 
ReadEEProm 
TransmitData 
ReceiveData 
MiscData 
PassThroughCommand 
GetGlobal 

Constructor & Destructor Documentation

◆ DeviceDataPacket() [1/4]

GLNeuroTech.Devices.Common.TransportLayer.DeviceDataPacket.DeviceDataPacket ( DeviceCommand  command,
byte []  data 
)

Device data packet constructor. param: device command and data.

Parameters
commandDevice command.
dataData a byte array.

◆ DeviceDataPacket() [2/4]

GLNeuroTech.Devices.Common.TransportLayer.DeviceDataPacket.DeviceDataPacket ( DeviceCommand  command,
byte []  data,
bool  isResponse 
)

Device data packet constructor - param: device command, data and isResponce.

Parameters
commandDevice command.
dataData a byte array.
isResponseIs response as boolean.

◆ DeviceDataPacket() [3/4]

GLNeuroTech.Devices.Common.TransportLayer.DeviceDataPacket.DeviceDataPacket ( DeviceDataPacket  otherPacket)

Device data packet constructor - param: device data packet.

Parameters
otherPacketDevice data packet.

◆ DeviceDataPacket() [4/4]

GLNeuroTech.Devices.Common.TransportLayer.DeviceDataPacket.DeviceDataPacket ( )

Device data packet constructor - no parameters.

Member Function Documentation

◆ CreateResponsePacket()

static DeviceDataPacket GLNeuroTech.Devices.Common.TransportLayer.DeviceDataPacket.CreateResponsePacket ( DeviceDataPacket  packet,
int  responseLength 
)
static

Create response packet.

Parameters
packetDevice data packet.
responseLengthResponse length.
Returns
Return a device data packet response.

Member Data Documentation

◆ Nack

DeviceDataPacket GLNeuroTech.Devices.Common.TransportLayer.DeviceDataPacket.Nack
static

Property Documentation

◆ Command

DeviceCommand GLNeuroTech.Devices.Common.TransportLayer.DeviceDataPacket.Command
getset

Command property.

◆ Data

byte [] GLNeuroTech.Devices.Common.TransportLayer.DeviceDataPacket.Data
getset

Data property.

◆ IsResponsePacket

bool GLNeuroTech.Devices.Common.TransportLayer.DeviceDataPacket.IsResponsePacket
getset

Is response packet property.

◆ Length

int GLNeuroTech.Devices.Common.TransportLayer.DeviceDataPacket.Length
get

Length property.