54 lines
1.4 KiB
C++
54 lines
1.4 KiB
C++
/*-------------------------------------------------------------------
|
|
ModbusProtocolAddOn.h
|
|
-------------------------------------------------------------------
|
|
|
|
(c) Vector Informatik GmbH. All rights reserved.
|
|
|
|
------------------------------------------------------------------- */
|
|
|
|
#pragma once
|
|
#include "ModbusProtocol.h"
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////////
|
|
|
|
/*--------------------------------------------------------------------*/
|
|
//! Factory for the VCSignalProtocol
|
|
/*!
|
|
This class is registered at the NIPB::IAddOnRegistrar registrar. It
|
|
is responsible to create a instance of the ModbusProtocol, when needed.
|
|
*/
|
|
class ModbusProtocolAddOn :
|
|
public NIPB::IProtocolAddOn
|
|
{
|
|
//
|
|
// Construction
|
|
//
|
|
public:
|
|
ModbusProtocolAddOn();
|
|
|
|
static ModbusProtocolAddOn& Instance();
|
|
|
|
//
|
|
// IProtocolAddOn
|
|
//
|
|
public:
|
|
VDECL CreateProtocol( const char /*in*/ *protocolSymbol, NIPB::IProtocol /*out*/ **protocol );
|
|
VDECL ReleaseProtocol( NIPB::IProtocol /*in*/ *protocol);
|
|
|
|
//
|
|
// Methods
|
|
//
|
|
public:
|
|
void Release();
|
|
|
|
//
|
|
// Attributes
|
|
//
|
|
private:
|
|
static ModbusProtocolAddOn *sInstance;
|
|
ModbusProtocol *sProtocol;
|
|
};
|
|
|
|
////////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////////
|