aProtocoldefs.h

group aProtocoldefs

BrainStem Protocol Definitions.

aProtocoldefs.h Provides protocol and BrainStem specific defines for entities, communication, and protocol specifics.

aBRAINSTEM_MAXPACKETBYTES

8 Bytes - Packet protocol payload maximum.

group UEI_Defines

UEI and Command support for C/C++ and Reflex languages.

Defines

ueiSPECIFIER_INDEX_MASK

0x1F - Mask bits for Index on index byte.

ueiSPECIFIER_RETURN_MASK

0xE0 - Mask bits for Return value on index byte.

ueiSPECIFIER_RETURN_HOST

1 << 5 - Specifier Bit for UEI response to host.

ueiSPECIFIER_RETURN_I2C

2 << 5 - Specifier Bit for UEI response to Module over I2C.

ueiSPECIFIER_RETURN_VM

3 << 5 - Specifier Bit for UEI response to VM on module.

ueiREPLY_ERROR

1 << 7 - Error flag on response in index byte.

ueiOPTION_GET

0x40 - Option byte code for UEI Get request.

ueiOPTION_VAL

0x00 - Option byte code for UEI Val response.

ueiOPTION_SET

0x80 - Option byte code for UEI Set request.

ueiOPTION_ACK

0xC0 - Option byte code for UEI Ack response.

ueiOPTION_MASK

0x3F - Mask for getting command option from option byte.

ueiOPTION_OP_MASK

0xC0 - Mask for getting Operation Get/Set/Val/Ack

System Entity

group cmdSYSTEM_Defines

System entity defines

Defines

cmdSYSTEM

3 - System entity command code.

group cmdSYSTEM_Command_Options

Defines

systemModule

1 - Module address option code.

systemRouter

2 - Router address option code.

systemHBInterval

3 - Heartbeat interval option code.

systemLED

4 - User LED option code.

systemSleep

5 - Sleep option code.

systemBootSlot

6 - Boot Slot option code.

aSystemBootSlotNone

255 - Disable boot slot value for Boot Slot option.

systemVersion

7 - Firmware Version option code.

systemModel

8 - Model option code.

systemSerialNumber

9 - Serial Number option code.

systemSave

10 - System save option code.

systemReset

11 - System reset option code.

systemInputVoltage

12 - Input voltage option code.

systemModuleHardwareOffset

13 - Module Offset option code.

systemModuleBaseAddress

14 - Module Base address option code.

systemModuleSoftwareOffset

15 - Module Software offset option code.

systemRouterAddressSetting

16 - Router address setting option code.

systemIPConfiguration

17 - IP configuration setting option code

systemIPModeDHCP
systemIPModeStatic
systemIPModeDefault
systemIPAddress

18 - IP address setting option code

systemIPStaticAddressSetting

19 - Static IP address setting option code

systemRouteToMe

20 - Route to me setting option code

systemInputCurrent

21 - Input current option code.

systemUptime

22 - System uptime option code.

systemMaxTemperature

23 - System max temperature option code.

systemLogEvents

24 - System log events option code.

Slot Entity

group cmdSLOT_Defines

System entity defines

Defines

cmdSLOT

4 - Slot Command Code.

group cmdSLOT_Command_Options

Defines

slotCapacity

1 - Slot Capacity option code.

slotSize

2 - Slot size option code

slotOpenRead

3 - Slot Open Read option code.

slotOpenWrite

4 - Slot Open Write option code.

slotSeek

5 - Slot Seek option code.

slotRead

6 - Slot Read option code.

slotWrite

7 - Slot Write option code.

slotClose

8 - Slot Close option code.

bitSlotError

0x80 - Bit Slot error code.

App Entity

group cmdAPP_Defines

App Entity defines

Defines

cmdAPP

5 - App command code.

group cmdAPP_Command_Options

Defines

appExecute

1 - Execute option code.

appReturn

2 - Return option code.

Mux Entity

group cmdMUX_Defines

Mux Entity defines

Defines

cmdMUX

6 - Mux command code.

group cmdMUX_Command_Options

Defines

muxEnable

1 - Channel enable option code.

muxChannel

2 - Select the active channel on the mux.

muxVoltage

3 - Get voltage measurement for the channel.

muxConfig

4 - Get voltage measurement for the channel.

muxConfig_default
muxConfig_splitMode
muxConfig_crossbar
muxSplit

5 - Get voltage measurement for the channel.

Pointer Entity

group cmdPOINTER_Defines

Pointer entity defines.

Defines

cmdPOINTER

7 - Pointer command code.

group cmdPOINTER_Command_Options

Defines

pointerOffset

1 - Pointer offset option code.

pointerMode

2 - Pointer mode option code.

pointerModeStatic

0 - Static pointer mode for pointer mode option code.

pointerModeIncrement

1 - Increment pointer mode for pointer mode option code.

DefaultPointerMode

pointerModeStatic - Default pointer mode for pointer mode option code.

pointerTransferStore

3 - Set Transfer store option code.

pointerChar

4 - Char pointer option code.

pointerShort

5 - Short pointer option code.

pointerInt

6 - Int pointer option code.

pointerTransferToStore

7 - Transfer to Store option code.

pointerTransferFromStore

8 - Transfer From store option code.

Debug command

cmdDEBUG

Debug command.

Analog Entity

group cmdANALOG_Defines

Analog Entity defines.

Defines

cmdANALOG

30 - Analog command code.

group cmdANALOG_Command_Options

Defines

analogConfiguration

1 - Analog configuration option code.

analogConfigurationInput

0 - Input configuration for configuration option code.

analogConfigurationOutput

1 - Output configuration for configuration option code.

analogConfigurationHiZ

2 - HiZ configuration for configuration option code.

analogValue

2 - Analog Value option code.

analogVoltage

3 - Analog Voltage option code.

analogBulkCaptureSampleRate

4 - Analog Bulk Capture Sample Rate option code.

analog_Hz_Minimum

7000 - minimum hertz sample rate for Bulk capture Sample Rate option code.

analog_Hz_Maximum

200000 - maximum hertz sample rate for Bulk capture Sample Rate option code.

analogBulkCaptureNumberOfSamples

5 - Bulk Capture number of samples option code.

analogBulkCapture

6 - Bulk Capture option code.

analogBulkCaptureState

7 - Bulk Capture State option code.

bulkCaptureIdle

0 - Idle state for Bulk Capture state option code.

bulkCapturePending

1 - Pending state for Bulk Capture state option code.

bulkCaptureFinished

2 - Finished state for Bulk Capture state option code.

bulkCaptureError

3 - Error state for Bulk Capture state option code.

analogRange

8 - Analog Range option code.

analogRange_P0V064N0V064

0 - +/- 64mV range for Analog Range option code.

analogRange_P0V64N0V64

1 - +/- 640mV range for Analog Range option code.

analogRange_P0V128N0V128

2 - +/- 128mV range for Analog Range option code.

analogRange_P1V28N1V28

3 - +/- 1.28V range for Analog Range option code.

analogRange_P1V28N0V0

4 - 0-1.28V range for Analog Range option code.

analogRange_P0V256N0V256

5 - +/- 256mV range for Analog Range option code.

analogRange_P2V56N2V56

6 - +/- 2.56V range for Analog Range option code.

analogRange_P2V56N0V0

7 - 0-2.56V range for Analog Range option code.

analogRange_P0V512N0V512

8 - +/- 512mV range for Analog Range option code.

analogRange_P5V12N5V12

9 - +/- 5.12V range for Analog Range option code.

analogRange_P5V12N0V0

10 - 0-5.12V range for Analog Range option code.

analogRange_P1V024N1V024

11 - +/- 1.024V range for Analog Range option code.

analogRange_P10V24N10V24

12 - +/- 10.24V range for Analog Range option code.

analogRange_P10V24N0V0

13 - 0-10.24V range for Analog Range option code.

analogRange_P2V048N0V0

14 - 0-2.048V range for Analog Range option code.

analogRange_P4V096N0V0

15 - 0-4.096V range for Analog Range option code.

analogEnable

9 - Analog Enable option code.

Digital Entity

group cmdDIGITAL_Defines

Digital entity defines.

Defines

cmdDIGITAL

31 - Digital command code.

group cmdDIGITAL_Command_Options

Defines

digitalConfiguration

1 - Digital configuration option code.

digitalConfigurationInput

0 - Input Digital configuration for configuration option code.

digitalConfigurationOutput

1 - Output Digital configuration for configuration option code.

digitalConfigurationRCServoInput

2 - RC Servo Input Digital configuration for configuration option code.

digitalConfigurationRCServoOutput

3 - RC Servo Output Digital configuration for configuration option code.

digitalConfigurationHiZ

4 - Hi Z the digital pin.

digitalConfigurationInputPullUp

0 - Input digital configuration with pull-up.

digitalConfigurationInputNoPull

4 - Input digital configuration with no pull-up/pull-down.

digitalConfigurationInputPullDown

5 - Input digital configuration with pull-down.

digitalConfigurationSignalOutput

6 - Signal output configuration

digitalConfigurationSignalInput

7 - Signal input configuration

digitalConfigurationSignalCounterInput

8 - Signal input conter configuration

digitalState

9 - State option code.

digitalStateAll

Rail Entity

group cmdRAIL_Defines

Rail entity defines.

Defines

cmdRAIL

32 - Rail command code.

group cmdRAIL_Command_Options

Defines

railVoltage

1 - Rail Voltage option code.

railVoltageSetpoint

11 - Rail Setpoint Voltage option code

railCurrent

2 - Rail Current option code.

railCurrentLimit

3 - Rail Current limit option code.

railTemperature

4 - Rail Temperature option code.

railEnable

5 - Rail Enable option code.

railValue

6 - Rail Value option code.

railKelvinSensingEnable

7 - Rail Kelvin sensing Mode option code.

kelvinSensingOff

0 - Kelvin Sensing off mode for Kelvin Sensing mode option code.

kelvinSensingOn

1 - Kelvin Sensing on mode for Kelvin Sensing mode option code.

railKelvinSensingState

8 - Kelving Sensing state option code.

railOperationalMode

9 - Operational mode option code.

operationalModeAuto

0 - Auto operational mode for operational mode option code.

operationalModeLinear

1 - Linear mode for operational mode option code.

operationalModeSwitcher

2 - Switcher mode for operational mode option code.

operationalModeSwitcherLinear

3 - Switcher Linerar mode for operational mode option code.

DefaultOperationalRailMode

operationalModeAuto - Default operational mode for operational mode option code.

railOperationalState

10 - Operational state option code.

operationalState_Initializing

0 - Initializing state for operational state option code.

operationalState_PowerGood

1 - PowerGood state for operational state option code.

operationalState_PowerFault

2 - PowerFault state for operational state option code.

operationalState_LDOOverTemp

3 - LDO over temp state for operational state option code.

operationalStateLinear

4 - Linear state for operational state option mode.

operationalStateSwitcher

5 - Switcher state for operational state option mode.

Temperature Entity

group cmdTEMPERATURE_Defines

Temperature entity defines.

Defines

cmdTEMPERATURE

33 - Temperature command code.

group cmdTEMPERATURE_Command_Options

Defines

temperatureMicroCelsius

1 - Temperature option code.

Capacity Command

group cmdCAPACITY_Defines

Capacity command.

Defines

cmdCAPACITY

73 - Capacity command code.

group cmdCAPACITY_Command_Options

Defines

capacityUEI

1 - UEI command option.

capacitySubClassSize

3 - SubClass size command option.

capacityClassQuantity

4 - Class Quantity command option.

capacitySubClassQuantity

5 - SubClass Quantity command option.

capacityEntityGroup

6 - Entity Group command option.

capacityBuild

7 - Build command option.

Store Entity

group cmdSTORE_Defines

Store entity defines.

Defines

cmdSTORE

77 - Store command code.

group cmdSTORE_Command_Options

Defines

storeSlotEnable

1 - Slot Enable option code.

storeSlotDisable

2 - Slot Disable option code.

storeSlotState

3 - Slot State option code.

storeWriteSlot

4 - Write Slot option code.

storeReadSlot

5 - Read Slot option code.

storeCloseSlot

6 - Close Slot option code.

Timer Entity

group cmdTIMER_Defines

Timer Entity Defines.

Defines

cmdTIMER

79 - Timer command code.

group cmdTIMER_Command_Options

Defines

timerExpiration

1 - Timer expiration option code.

timerMode

2 - Timer Mode option code.

timerModeSingle

0 - Single mode for timer mode option code.

timerModeRepeat

1 - Repeat mode for timer mode option code.

DefaultTimerMode

timerModeSingle - Default mode for timer mode option code.

Clock Entity

group cmdCLOCK_Defines

Clock entity defines.

Defines

cmdCLOCK

83 - Clock command code.

group cmdCLOCK_Command_Options

Defines

clockYear

1 - Year option code.

clockMonth

2 - Month option code.

clockDay

3 - Day option code.

clockHour

4 - Hour option code.

clockMinute

5 - Minute option code.

clockSecond

6 - Second option code.

USB Entity

group cmdUSB_Defines

USB entity defines.

Defines

cmdUSB

18 - USB command code.

group cmdUSB_Command_Options

Defines

usbPortEnable

1 - Port Enable option code.

usbPortDisable

2 - Port Disable option code.

usbDataEnable

3 - Data Enable option code.

usbDataDisable

4 - Data Disable option code.

usbPowerEnable

5 - Power Enable option code.

usbPowerDisable

6 - Power Disable option code.

usbPortCurrent

7 - Port Current option code.

usbPortVoltage

8 - Port Voltage option code.

usbHubMode

9 - Hub Mode option code.

usbPortClearErrorStatus

12 - Hub Clear Error Status option code.

usbUpstreamMode

13 - SystemTemperature option code.

usbUpstreamModeAuto

2 - UpstreamMode Auto for upstream mode option code.

usbUpstreamModePort0

0 - UpstreamMode Port 0 for upstream mode option code.

usbUpstreamModePort1

1 - UpstreamMode Port 1 for upstream mode option code.

usbUpstreamModeNone

255 - UpstreamMode None to turn off all upstream connections.

usbUpstreamModeDefault

1 - UpstreamMode default for upstream mode option code.

usbUpstreamState

15 - UpstreamState option code.

usbUpstreamStateNone

2 - UpstreamMode Auto for upstream mode option code.

usbUpstreamStatePort0

0 - UpstreamMode Port 0 for upstream mode option code.

usbUpstreamStatePort1

1 - UpstreamMode Port 1 for upstream mode option code.

usbHubEnumerationDelay

16 - Downstream ports enumeration delay option code.

usbPortCurrentLimit

17 - Set or get the port current limit option code.

usbUpstreamBoostMode

18 - Set/Get upstream boost mode.

usbDownstreamBoostMode

19 - Set/Get downstream boost mode.

usbBoostMode_0

0 - Boost mode off, no boost

usbBoostMode_4

1 - Boost mode 4%

usbBoostMode_8

2 - Boost mode 8%

usbBoostMode_12

3 - Boost mode 12%

usbPortMode

20 - Set/Get Port mode (bit-packed) The portMode bits follow and numbered according to their bit position. if they are set i.e. a 1 in the bit position the corresponding setting is enabled.

usbPortMode_sdp

0 - Standard Downstream port (0.5 Amp)

usbPortMode_cdp

1 - Charging Downstream port (2.1 Amp)

usbPortMode_charging

2 - Trickle changing functionality

usbPortMode_passive

3 - Electrical pasthrough of VBUS

usbPortMode_USB2AEnable

4 - USB2 dataline A side enabled

usbPortMode_USB2BEnable

4 - USB2 dataline B side enabled

usbPortMode_VBusEnable

5 - USB VBUS enabled

usbPortMode_SuperSpeed1Enable

6 - USB SS Speed dataline side A enabled

usbPortMode_SuperSpeed2Enable

7 - USB SS Speed dataline side B enabled

usbPortMode_USB2BoostEnable

8 - USB2 Boost Mode Enabled

usbPortMode_USB3BoostEnable

9 - USB3 Boost Mode Enabled

usbPortMode_AutoConnectEnable

10 - Auto-connect Mode Enabled

usbPortMode_CC1Enable

11 - CC1 Enabled

usbPortMode_CC2Enable

12 - CC2 Enabled

usbPortMode_SBUEnable

13 - SBU1 Enabled

usbPortMode_CCFlipEnable

15 - Flip CC1 and CC2

usbPortMode_SSFlipEnable

16 - Flip Super speed data lines

usbPortMode_SBUFlipEnable

17 - Flip Side Band Unit lines.

usbPortMode_USB2FlipEnable

18 - Flip Side Band Unit lines.

usbPortMode_CC1InjectEnable

19 - Internal Use

usbPortMode_CC2InjectEnable

20 - Internal Use

usbHiSpeedDataEnable

21 - Hi-Speed Data Enable option code.

usbHiSpeedDataDisable

22 - Hi-Speed Data Disable option code.

usbSuperSpeedDataEnable

23 - SuperSpeed Data Enable option code.

usbSuperSpeedDataDisable

24 -SuperSpeed Data Disable option code.

usbDownstreamDataSpeed

25 - Get downstream port speed option code.

usbDownstreamDataSpeed_na

0 - Unknown

usbDownstreamDataSpeed_hs

1 - Hi-Speed (2.0)

usbDownstreamDataSpeed_ss

2 - SuperSpeed (3.0)

usbDownstreamDataSpeed_ls

3 - TODO

usbConnectMode

26 USB connect mode option code

usbManualConnect

0 - Auto connect disabled

usbAutoConnect

1 - Auto connect enabled

usbCC1Enable

27 - CC1 Enable option code (USB Type C).

usbCC2Enable

28 - CC2 Disable option code (USB Type C).

usbSBUEnable

29 - SBU1/2 enable option code (USB Type C).

usbCC1Current

30 - CC1 get current option code (USB Type C).

usbCC2Current

31 - CC2 get current option code (USB Type C).

usbCC1Voltage

32 - CC1 get voltage option code (USB Type C).

usbCC2Voltage

33 - CC2 get voltage option code (USB Type C).

usbPortState

34 - TODO

usbPortError

35 - TODO

usbCableFlip

36 - TODO

Upgrade command

cmdUPGRADE

Upgrade command.

Last command

cmdLAST

Last command.