LevelMeter-Display  2.0
An ultrasonic Level Meter for Stormwater Cisterns
Data Fields
BTPacket_t Struct Reference

Description of a Bluetooth Packet. More...

Data Fields

uint8_t checksum
 The checksum from packetType to dataLengthH. More...
 
uint8_t data []
 The data. More...
 
uint8_t dataLengthH
 The high byte of the data length. More...
 
uint8_t dataLengthL
 The low byte of the data length. More...
 
uint8_t opcode
 
uint8_t packetType
 

Detailed Description

Description of a Bluetooth Packet.

Note
This struct does not include the starting STX and terminal ETX of the frame transmitted over the serial line.

Field Documentation

◆ checksum

uint8_t checksum

The checksum from packetType to dataLengthH.

◆ data

uint8_t data[]

The data.

Referenced by DoCflags().

◆ dataLengthH

uint8_t dataLengthH

The high byte of the data length.

Note
We currently ignore the high byte of the length since we don't have enough memory to store packets bigger then cmdline. Packets that big don't appear until now.
Be aware that this is some kind of security risk. If a paired sender manages to send arbitrary large packets he could send requests to the display. Since this is only possible while the Bluetooth module is not in transparent mode, this seems acceptable to me.

◆ dataLengthL

uint8_t dataLengthL

The low byte of the data length.

◆ opcode

uint8_t opcode

Referenced by DoCflags().

◆ packetType

uint8_t packetType

Referenced by DoCflags().


The documentation for this struct was generated from the following file: