IQRF Gateway Daemon
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
ProtocolBridge Class Reference

#include <ProtocolBridge.h>

Inheritance diagram for ProtocolBridge:
ProtocolBridgeJson

Classes

struct  AllVisibleMetersResponse
 
struct  CompactPacketResponse
 
struct  DeleteAllResponse
 
struct  DeleteIdResponse
 
struct  FullPacketResponse
 
struct  InvisibleConfirmationResponse
 
struct  NewDataInfoResponse
 
struct  NewInvisibleMetersResponse
 
struct  NewVisibleMetersResponse
 
struct  SetAnyPacketModeResponse
 
struct  SetNodeTimeoutResponse
 
struct  SleepNowResponse
 
struct  SysinfoResponse
 
struct  VisibleConfirmationResponse
 

Public Types

enum  Cmd {
  Cmd::SYSINFO, Cmd::GET_NEW_VISIBLE, Cmd::GET_NEW_INVISIBLE, Cmd::GET_ALL_VISIBLE,
  Cmd::GET_NEW_DATA_INFO, Cmd::GET_COMPACT_PACKET, Cmd::GET_FULL_PACKET, Cmd::GET_VISIBLE_CONFIRMATION,
  Cmd::GET_INVISIBLE_CONFIRMATION, Cmd::SLEEP_NOW, Cmd::DELETE_ID, Cmd::DELETE_ALL,
  Cmd::SET_SLEEP_INTERVAL, Cmd::SET_WM_TIMEOUT, Cmd::SET_WM_ALL_READED_TIMEOUT, Cmd::SET_NODE_TIMEOUT,
  Cmd::SET_ANY_PACKET_MODE
}
 
enum  FrcCmd { FrcCmd::ALIVE, FrcCmd::STAT }
 

Public Member Functions

 ProtocolBridge ()
 
virtual ~ProtocolBridge ()
 
void commandSysinfo ()
 
void commandGetNewVisible ()
 
void commandGetNewInvisible ()
 
void commandGetAllVisible ()
 
void commandGetNewDataInfo ()
 
void commandGetCompactPacket (uint16_t meterIndex)
 
void commandGetFullPacket (uint16_t meterIndex)
 
void commandGetVisibleConfirmation (uint8_t index, uint8_t map[])
 
void commandGetInvisibleConfirmation (uint8_t index, uint8_t map[])
 
void commandSleepNow (uint16_t sleepTime)
 
void commandDeleteId (uint16_t meterIndex)
 
void commandDeleteAll ()
 
void commandSetSleepInterval (uint16_t sleepInterval)
 
void commandSetWmTimeout (uint16_t wmTimeout)
 
void commandSetWmAllReadedTimeout (uint16_t wmTimeout)
 
void commandSetNodeTimeout (uint16_t nodeTimeout)
 
void commandSetAnyPacketMode (bool enable)
 
void parseResponse (const DpaMessage &response) override
 
void parseCommand (const std::string &command) override
 
const std::string & encodeCommand () const override
 
SysinfoResponse getSysinfoResponse () const
 
NewVisibleMetersResponse getNewVisibleMetersResponse () const
 
NewInvisibleMetersResponse getNewInvisibleMetersResponse () const
 
AllVisibleMetersResponse getAllVisibleMetersResponse () const
 
NewDataInfoResponse getNewDataInfoResponse () const
 
CompactPacketResponse getCompactPacketResponse () const
 
FullPacketResponse getFullPacketResponse () const
 
VisibleConfirmationResponse getVisibleConfirmationResponse () const
 
InvisibleConfirmationResponse getInvisibleConfirmationResponse () const
 
SleepNowResponse getSleepNowResponse () const
 
DeleteIdResponse getDeleteIdResponse () const
 
DeleteAllResponse getDeleteAllResponse () const
 
SetNodeTimeoutResponse getSetNodeTimeoutResponse () const
 
SetAnyPacketModeResponse getSetAnyPacketModeResponse () const
 
Cmd getCmd () const
 

Static Public Attributes

static const std::string PRF_NAME
 
static const int CONFIRMATION_BITMAP_LEN = 10
 
static const int SYSINFO_SERIAL_NUMBER_LEN = 12
 
static const int SYSINFO_FIRMWARE_VERSION_LEN = 5
 
static const int VISIBLE_METERS_BITMAP_LEN = 38
 
static const int INVISIBLE_METERS_BITMAP_LEN = 38
 
static const int ALL_VISIBLE_METERS_BITMAP_LEN = 38
 
static const int NEW_DATA_INFO_BITMAP_LEN = 38
 
static const int VMBUS_MAX_FRAME_LEN = 45
 

Detailed Description

Copyright 2016-2017 MICRORISC s.r.o.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Member Enumeration Documentation

◆ Cmd

enum ProtocolBridge::Cmd
strong
Enumerator
SYSINFO 
GET_NEW_VISIBLE 
GET_NEW_INVISIBLE 
GET_ALL_VISIBLE 
GET_NEW_DATA_INFO 
GET_COMPACT_PACKET 
GET_FULL_PACKET 
GET_VISIBLE_CONFIRMATION 
GET_INVISIBLE_CONFIRMATION 
SLEEP_NOW 
DELETE_ID 
DELETE_ALL 
SET_SLEEP_INTERVAL 
SET_WM_TIMEOUT 
SET_WM_ALL_READED_TIMEOUT 
SET_NODE_TIMEOUT 
SET_ANY_PACKET_MODE 

◆ FrcCmd

Enumerator
ALIVE 
STAT 

Constructor & Destructor Documentation

◆ ProtocolBridge()

ProtocolBridge::ProtocolBridge ( )

◆ ~ProtocolBridge()

ProtocolBridge::~ProtocolBridge ( )
virtual

Member Function Documentation

◆ commandDeleteAll()

void ProtocolBridge::commandDeleteAll ( )

◆ commandDeleteId()

void ProtocolBridge::commandDeleteId ( uint16_t  meterIndex)

◆ commandGetAllVisible()

void ProtocolBridge::commandGetAllVisible ( )

◆ commandGetCompactPacket()

void ProtocolBridge::commandGetCompactPacket ( uint16_t  meterIndex)

◆ commandGetFullPacket()

void ProtocolBridge::commandGetFullPacket ( uint16_t  meterIndex)

◆ commandGetInvisibleConfirmation()

void ProtocolBridge::commandGetInvisibleConfirmation ( uint8_t  index,
uint8_t  map[] 
)

◆ commandGetNewDataInfo()

void ProtocolBridge::commandGetNewDataInfo ( )

◆ commandGetNewInvisible()

void ProtocolBridge::commandGetNewInvisible ( )

◆ commandGetNewVisible()

void ProtocolBridge::commandGetNewVisible ( )

◆ commandGetVisibleConfirmation()

void ProtocolBridge::commandGetVisibleConfirmation ( uint8_t  index,
uint8_t  map[] 
)

◆ commandSetAnyPacketMode()

void ProtocolBridge::commandSetAnyPacketMode ( bool  enable)

◆ commandSetNodeTimeout()

void ProtocolBridge::commandSetNodeTimeout ( uint16_t  nodeTimeout)

◆ commandSetSleepInterval()

void ProtocolBridge::commandSetSleepInterval ( uint16_t  sleepInterval)

◆ commandSetWmAllReadedTimeout()

void ProtocolBridge::commandSetWmAllReadedTimeout ( uint16_t  wmTimeout)

◆ commandSetWmTimeout()

void ProtocolBridge::commandSetWmTimeout ( uint16_t  wmTimeout)

◆ commandSleepNow()

void ProtocolBridge::commandSleepNow ( uint16_t  sleepTime)

◆ commandSysinfo()

void ProtocolBridge::commandSysinfo ( )

◆ encodeCommand()

const std::string & ProtocolBridge::encodeCommand ( ) const
override

◆ getAllVisibleMetersResponse()

AllVisibleMetersResponse ProtocolBridge::getAllVisibleMetersResponse ( ) const
inline

◆ getCmd()

ProtocolBridge::Cmd ProtocolBridge::getCmd ( ) const

◆ getCompactPacketResponse()

CompactPacketResponse ProtocolBridge::getCompactPacketResponse ( ) const
inline

◆ getDeleteAllResponse()

DeleteAllResponse ProtocolBridge::getDeleteAllResponse ( ) const
inline

◆ getDeleteIdResponse()

DeleteIdResponse ProtocolBridge::getDeleteIdResponse ( ) const
inline

◆ getFullPacketResponse()

FullPacketResponse ProtocolBridge::getFullPacketResponse ( ) const
inline

◆ getInvisibleConfirmationResponse()

InvisibleConfirmationResponse ProtocolBridge::getInvisibleConfirmationResponse ( ) const
inline

◆ getNewDataInfoResponse()

NewDataInfoResponse ProtocolBridge::getNewDataInfoResponse ( ) const
inline

◆ getNewInvisibleMetersResponse()

NewInvisibleMetersResponse ProtocolBridge::getNewInvisibleMetersResponse ( ) const
inline

◆ getNewVisibleMetersResponse()

NewVisibleMetersResponse ProtocolBridge::getNewVisibleMetersResponse ( ) const
inline

◆ getSetAnyPacketModeResponse()

SetAnyPacketModeResponse ProtocolBridge::getSetAnyPacketModeResponse ( ) const
inline

◆ getSetNodeTimeoutResponse()

SetNodeTimeoutResponse ProtocolBridge::getSetNodeTimeoutResponse ( ) const
inline

◆ getSleepNowResponse()

SleepNowResponse ProtocolBridge::getSleepNowResponse ( ) const
inline

◆ getSysinfoResponse()

SysinfoResponse ProtocolBridge::getSysinfoResponse ( ) const
inline

◆ getVisibleConfirmationResponse()

VisibleConfirmationResponse ProtocolBridge::getVisibleConfirmationResponse ( ) const
inline

◆ parseCommand()

void ProtocolBridge::parseCommand ( const std::string &  command)
override

◆ parseResponse()

void ProtocolBridge::parseResponse ( const DpaMessage &  response)
override

Member Data Documentation

◆ ALL_VISIBLE_METERS_BITMAP_LEN

const int ProtocolBridge::ALL_VISIBLE_METERS_BITMAP_LEN = 38
static

◆ CONFIRMATION_BITMAP_LEN

const int ProtocolBridge::CONFIRMATION_BITMAP_LEN = 10
static

◆ INVISIBLE_METERS_BITMAP_LEN

const int ProtocolBridge::INVISIBLE_METERS_BITMAP_LEN = 38
static

◆ NEW_DATA_INFO_BITMAP_LEN

const int ProtocolBridge::NEW_DATA_INFO_BITMAP_LEN = 38
static

◆ PRF_NAME

const std::string ProtocolBridge::PRF_NAME
static

Copyright 2016-2017 MICRORISC s.r.o.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

◆ SYSINFO_FIRMWARE_VERSION_LEN

const int ProtocolBridge::SYSINFO_FIRMWARE_VERSION_LEN = 5
static

◆ SYSINFO_SERIAL_NUMBER_LEN

const int ProtocolBridge::SYSINFO_SERIAL_NUMBER_LEN = 12
static

◆ VISIBLE_METERS_BITMAP_LEN

const int ProtocolBridge::VISIBLE_METERS_BITMAP_LEN = 38
static

◆ VMBUS_MAX_FRAME_LEN

const int ProtocolBridge::VMBUS_MAX_FRAME_LEN = 45
static

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