BAOS SDK v2  1.0.1
An SDK providing access to IP-BAOS devices through BAOS binary protocol version 2.x
Defines.h File Reference

Global BAOS protocol defines and types. More...

#include "baos/config.h"
+ Include dependency graph for Defines.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  StatusFlags
 This structure represents the status flags provided by some BAOS devices server item ServerItemId::StatusFlags. More...
 
class  StatusFlagsSupported
 Represents which status flags are supported by the device, serveritem 52. More...
 
struct  ServerItem
 Structure to hold information about a serveritem. More...
 
struct  DatapointConfigFlags
 Struct for the communication flags of a datapoint. See KNX spec for more details. More...
 
struct  DatapointStatus
 Internal state for each datapoint in the object server. More...
 
struct  DatapointValueState
 A combination of the status of a datapoint and its actual value. More...
 
struct  DatapointChangeValue
 A pair of the DatapointSetCommand and the Datapoint value for changing datapoint values. More...
 
struct  DatapointDescription
 Represents the information about a datapoint in the BAOS device. More...
 

Namespaces

 wz::baos
 Global BAOS sdk namespace.
 
 wz::baos::protocol
 Groups BAOS binary protocol specific types , defines and classes for Indications, Responses etc.
 

Typedefs

using DatapointValue = wz::baos::Buffer
 An type for the DatapointValues.
 
using DatapointValues = std::map< std::uint16_t, DatapointValue >
 A map with datapoint ids as keys and DatapointValue as values.
 
using ServerItem_StatusFlagType = std::uint16_t
 Serveritem status flag type.
 
using ServerItems = std::vector< ServerItem >
 Type for a list of ServerItems.
 
using DatapointValueStates = std::map< std::uint16_t, DatapointValueState >
 
using DatapointChangeValues = std::map< std::uint16_t, DatapointChangeValue >
 
using DatapointDescriptions = std::map< std::uint16_t, DatapointDescription >
 
using DatapointDescriptionString = std::string
 Strong type for the description string.
 
using DatapointDescriptionStrings = std::map< std::uint16_t, DatapointDescriptionString >
 
using ParameterBytes = std::vector< std::uint8_t >
 Strong type for a list of parameter bytes.
 

Enumerations

enum class  ServerItem_StatusFlag : ServerItem_StatusFlagType {
  RUNNING = 1 ,
  LOADED = 2 ,
  TL_CONNECTED = 4 ,
  SECURE = 8
}
 Enum class representing the flags inside the status flag serveritem. More...
 
enum class  DatapointValueFilter : std::uint8_t {
  ALL ,
  VALID ,
  UPDATED
}
 Requested datapoint value can be filtered by this criteria. More...
 
enum class  DatapointSetCommand : std::uint8_t {
  NoCommand = 0x00 ,
  SetNewValue = 0x01 ,
  SendValueOnBus = 0x02 ,
  SetNewValueAndSendOnBus = 0x03 ,
  ReadNewValueViaBus ,
  ClearTransmissionState = 0x05
}
 Setting a datapoint value there are different modes supported. This enum class gives those modes names. More...
 
enum class  TransmitPriority : std::uint8_t {
  System = 0x00 ,
  High = 0x01 ,
  Alarm = 0x02 ,
  Low = 0x03
}
 The knx transmit priority.
 
enum class  TransmissionStatus : std::uint8_t {
  Idle_OK = 0x00 ,
  Idle_Error = 0x01 ,
  InProgress = 0x02 ,
  Request = 0x03
}
 Internal transmit state of the device.
 
enum class  BaosSubServiceTypes : std::uint8_t {
  MinRequest = 0x01 ,
  GetServerItemRequest = 0x01 ,
  SetServerItemRequest = 0x02 ,
  GetDatapointDescriptionRequest = 0x03 ,
  GetDescriptionStringRequest = 0x04 ,
  GetDatapointValueRequest = 0x05 ,
  SetDatapointValueRequest = 0x06 ,
  GetParameterByteRequest = 0x07 ,
  MaxRequest = 0x0C ,
  MinResponse = 0x81 ,
  GetServerItemResponse = 0x81 ,
  SetServerItemResponse = 0x82 ,
  GetDatapointDescriptionResponse = 0x83 ,
  GetDescriptionStringResponse = 0x84 ,
  GetDatapointValueResponse = 0x85 ,
  SetDatapointValueResponse = 0x86 ,
  GetParameterByteResponse = 0x87 ,
  MaxResponse = 0x8C ,
  MinIndication = 0xC1 ,
  DatapointValueIndication = 0xC1 ,
  ServerItemIndication = 0xC2 ,
  MaxIndication = 0xC2
}
 The in the baos binary protocol specified sub services and some internal ranges in them.
 
enum class  BaosResponseCode : std::uint8_t {
  Success = 0 ,
  Internal = 1 ,
  NoItemFound = 2 ,
  BufferTooSmall = 3 ,
  ItemNotWriteable = 4 ,
  ServiceNotSupported = 5 ,
  BadServiceParameter = 6 ,
  WrongDpId = 7 ,
  BadDpCmd = 8 ,
  BadDpValueLength = 9 ,
  MessageInconsistent = 10 ,
  ObjectServerIsBusy = 11
}
 These are the BaosServerErrorCodes. More...
 
enum class  DatapointSize : std::uint8_t {
  BITS_1 = 0 ,
  BITS_2 = 1 ,
  BITS_3 = 2 ,
  BITS_4 = 3 ,
  BITS_5 = 4 ,
  BITS_6 = 5 ,
  BITS_7 = 6 ,
  BYTE_1 = 7 ,
  BYTES_2 = 8 ,
  BYTES_3 = 9 ,
  BYTES_4 = 10 ,
  BYTES_6 = 11 ,
  BYTES_8 = 12 ,
  BYTES_10 = 13 ,
  BYTES_14 = 14
}
 Enum class representing the different datapoint lengths.
 
enum class  DPT : std::uint8_t {
  DPT_1 = 1 ,
  DPT_2 = 2 ,
  DPT_3 = 3 ,
  DPT_4 = 4 ,
  DPT_5 = 5 ,
  DPT_6 = 6 ,
  DPT_7 = 7 ,
  DPT_8 = 8 ,
  DPT_9 = 9 ,
  DPT_10 = 10 ,
  DPT_11 = 11 ,
  DPT_12 = 12 ,
  DPT_13 = 13 ,
  DPT_14 = 14 ,
  DPT_15 = 15 ,
  DPT_16 = 16 ,
  DPT_17 = 17 ,
  DPT_18 = 18
}
 Enumeration value for the supported datapoint types( DPTs ) More...
 
enum class  ServerItemId : std::uint8_t {
  Invalid = 0 ,
  HardwareType = 1 ,
  HardwareVersion = 2 ,
  FirmwareVersion = 3 ,
  ManufactureCodeDevice = 4 ,
  ManufactureCodeApp = 5 ,
  ApplicationId = 6 ,
  ApplicationVersion = 7 ,
  SerialNumber = 8 ,
  TimeSinceReset = 9 ,
  BusConnected = 10 ,
  MaxBufferSize = 11 ,
  LengthOfDescriptionString = 12 ,
  BaudrateItem = 13 ,
  CurrentBufferSize = 14 ,
  ProgrammingMode = 15 ,
  BinaryProtocolVersion = 16 ,
  IndicationSetting = 17 ,
  WebServicesProtocolVersion ,
  RestServiceProtocolVersion = 19 ,
  IndividualAddress = 20 ,
  MacAddress = 21 ,
  TunnellingEnabled = 22 ,
  BaosBinaryEnabled = 23 ,
  BaosWebEnabled = 24 ,
  BaosRestEnabled = 25 ,
  HttpFileEnabled = 26 ,
  SearchRequestEnabled = 27 ,
  IsStructured = 28 ,
  MaxManagementClients = 29 ,
  ConnectedManagementClients = 30 ,
  MaxTunnellingClients = 31 ,
  ConnectedTunnellingClients = 32 ,
  MaxBaosUdpClients = 33 ,
  ConnectedBaosUdpClients = 34 ,
  MaxBaosTcpClients = 35 ,
  ConnectedBaosTcpClients = 36 ,
  DeviceFriendlyName = 37 ,
  MaxDatapoints = 38 ,
  ConfiguredDatapoints = 39 ,
  MaxParameterBytes = 40 ,
  DownloadCounter = 41 ,
  IPAssignment = 42 ,
  IPAddress = 43 ,
  SubnetMask = 44 ,
  DefaultGateway = 45 ,
  TimeSinceResetUnit = 46 ,
  SystemTime = 47 ,
  SystemTimezoneOffset = 48 ,
  MenuEnabled = 49 ,
  SuspendEnabled = 50 ,
  RFDomainAddress = 51 ,
  StatusFlagsSupported = 52 ,
  StatusFlags = 53
}
 An enum class to provide conveniant names to the serveritem ids. More...
 
enum class  TimeSinceResetUnit {
  milliseconds ,
  seconds ,
  minutes ,
  hours
}
 The ServerItemId::TimeSinceResetUnit current unit for TimeSinceReset. This type gives those units a name.
 
enum class  IpAssigmentMethod {
  manual = 0x1 ,
  bootp = 0x2 ,
  dhcp = 0x4 ,
  autoIp = 0x8
}
 An Ip device may have different methods for ip assigment. More...
 

Functions

BAOSLIB_EXPORT std::string transmitPriorityToString (TransmitPriority transmitPrio)
 Convert the enum value to a human readable string.
 
BAOSLIB_EXPORT std::string transmissionStatusToString (TransmissionStatus transmissionStatus)
 Convert the enum value to a human readable string.
 
BAOSLIB_EXPORT std::string getBaosSubServiceTypeDescription (BaosSubServiceTypes subServiceType)
 Convert the enum value to a human readable string.
 
std::string baosResponseCodeToString (BaosResponseCode code)
 Convert the enum value to a human readable string.
 
BAOSLIB_EXPORT std::string dpSizeToString (DatapointSize dpSize)
 Convert the enum value to a human readable string.
 
BAOSLIB_EXPORT std::uint8_t dpSizeInBytes (DatapointSize dpSize)
 Convert the enum value to a intergral size in bytes.
 
BAOSLIB_EXPORT std::string dptToString (DPT dpt)
 Convert the enum value to a human readable string.
 
BAOSLIB_EXPORT std::string serverItemIdToString (ServerItemId sid)
 Convert the enum value to a human readable string.
 
BAOSLIB_EXPORT std::string timeSinceResetUnitToString (TimeSinceResetUnit unit)
 Convert the enum value to a human readable string.
 

Variables

Protocol defines and positions
constexpr std::uint8_t BAOS_MAIN_SERVICE = 0xF0
 The main service to identify a BAOS telegram by.
 
constexpr std::size_t POS_MAIN_SERVICE = 0
 The 0 based position of the main service byte.
 
constexpr std::size_t POS_SUB_SERVICE = 1
 The 0 based position of the sub service byte.
 
constexpr std::size_t POS_START
 The 0 based position of the start element (startitem, start datapoint id etc.) More...
 
constexpr std::size_t POS_NUMBER_OF_ELEMENTS = 4
 The 0 based position of the number of elements in the packet.
 
constexpr std::size_t POS_ERRORCODE = 6
 The 0 bases position of the errorcode if available.
 
constexpr std::size_t POS_PAYLOAD_BEGIN = 6
 The 0 based position of the payload in the packet.
 

Detailed Description

Global BAOS protocol defines and types.