当前位置: 首页>>代码示例>>C++>>正文


C++ Msg::Append方法代码示例

本文整理汇总了C++中Msg::Append方法的典型用法代码示例。如果您正苦于以下问题:C++ Msg::Append方法的具体用法?C++ Msg::Append怎么用?C++ Msg::Append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Msg的用法示例。


在下文中一共展示了Msg::Append方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Msg

//-----------------------------------------------------------------------------
// <ManufacturerProprietary::RequestValue>
// Request current value from the device
//-----------------------------------------------------------------------------
bool ManufacturerProprietary::RequestValue
(
    uint32 const _requestFlags,
    uint16 const _index,
    uint8 const _instance,
    Driver::MsgQueue const _queue
)
{
    if ( IsGetSupported() )
    {
        Msg* msg = new Msg( "ManufacturerProprietary_RequestValue", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
        if (FibaroVenetianBlindsValueIds_Blinds == _index || FibaroVenetianBlindsValueIds_Tilt == _index){
            msg->SetInstance( this, _instance );
            msg->Append( GetNodeId() );
            msg->Append( 1+sizeof(MANUFACTURER_ID_FIBARO)+sizeof(FIBARO_VENETIAN_BLINDS_GET_POSITION_TILT) ); // length of data
            msg->Append( GetCommandClassId() );
            msg->AppendArray( MANUFACTURER_ID_FIBARO, sizeof(MANUFACTURER_ID_FIBARO) );
            msg->AppendArray( FIBARO_VENETIAN_BLINDS_GET_POSITION_TILT, sizeof(FIBARO_VENETIAN_BLINDS_GET_POSITION_TILT) );
            msg->Append( GetDriver()->GetTransmitOptions() );
            GetDriver()->SendMsg( msg, _queue );
            return true;
        } else {
            Log::Write( LogLevel_Info, GetNodeId(), "ManufacturerProprietary_RequestValue Not Supported for value index %d",
                    _index);
        }
    } else {
        Log::Write( LogLevel_Info, GetNodeId(), "ManufacturerProprietary_RequestValue Not Supported on this node");
    }
    return false;
}
开发者ID:jeedom,项目名称:plugin-openzwave,代码行数:34,代码来源:ManufacturerProprietary.cpp

示例2: Msg

//-----------------------------------------------------------------------------
// <ThermostatFanState::RequestValue>
// Get the thermostat fan state details from the device
//-----------------------------------------------------------------------------
bool ThermostatFanState::RequestValue
(
	uint32 const _requestFlags,
	uint8 const _dummy1,	// = 0 (not used)
	uint8 const _instance,
	Driver::MsgQueue const _queue
)
{
	if ( IsGetSupported() )
	{
		// Request the current state
		Msg* msg = new Msg( "ThermostatFanStateCmd_Get", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
		msg->SetInstance( this, _instance );
		msg->Append( GetNodeId() );
		msg->Append( 2 );
		msg->Append( GetCommandClassId() );
		msg->Append( ThermostatFanStateCmd_Get );
		msg->Append( GetDriver()->GetTransmitOptions() );
		GetDriver()->SendMsg( msg, _queue );
		return true;
	} else {
		Log::Write(  LogLevel_Info, GetNodeId(), "ThermostatFanStateCmd_Get Not Supported on this node");
	}
	return false;
}
开发者ID:RomanGrekov,项目名称:z_gateway,代码行数:29,代码来源:ThermostatFanState.cpp

示例3: Msg

//-----------------------------------------------------------------------------
// <SensorMultilevel::RequestState>
// Request current state from the device
//-----------------------------------------------------------------------------
bool SensorMultilevel::RequestState
(
	uint32 const _requestFlags,
	uint8 const _instance,
	Driver::MsgQueue const _queue
)
{
	bool res = false;
	if( GetVersion() > 4 )
	{
		if( _requestFlags & RequestFlag_Static )
		{
 			Msg* msg = new Msg( "SensorMultilevelCmd_SupportedGet", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
			msg->SetInstance( this, _instance );
			msg->Append( GetNodeId() );
			msg->Append( 2 );
			msg->Append( GetCommandClassId() );
			msg->Append( SensorMultilevelCmd_SupportedGet );
			msg->Append( GetDriver()->GetTransmitOptions() );
			GetDriver()->SendMsg( msg, _queue );
			res = true;
		}
	}

	if( _requestFlags & RequestFlag_Dynamic )
	{
		res |= RequestValue( _requestFlags, 0, _instance, _queue );
	}

	return res;
}
开发者ID:BryanJenks,项目名称:node-openzwave,代码行数:35,代码来源:SensorMultilevel.cpp

示例4: Msg

//-----------------------------------------------------------------------------
// <SwitchMultilevel::RequestValue>
// Request current value from the device
//-----------------------------------------------------------------------------
bool SwitchMultilevel::RequestValue
(
	uint32 const _requestFlags,
	uint8 const _index,
	uint8 const _instance,
	Driver::MsgQueue const _queue
)
{
	if( _index == SwitchMultilevelIndex_Level )
	{
		if ( IsGetSupported() )
		{
			Msg* msg = new Msg( "SwitchMultilevelCmd_Get", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
			msg->SetInstance( this, _instance );
			msg->Append( GetNodeId() );
			msg->Append( 2 );
			msg->Append( GetCommandClassId() );
			msg->Append( SwitchMultilevelCmd_Get );
			msg->Append( GetDriver()->GetTransmitOptions() );
			GetDriver()->SendMsg( msg, _queue );
			return true;
		} else {
			Log::Write(  LogLevel_Info, GetNodeId(), "SwitchMultilevelCmd_Get Not Supported on this node");
		}
	}
	return false;
}
开发者ID:1337bacon,项目名称:open-zwave,代码行数:31,代码来源:SwitchMultilevel.cpp

示例5: Msg

//-----------------------------------------------------------------------------
// <ManufacturerSpecific::RequestValue>
// Request current value from the device
//-----------------------------------------------------------------------------
bool ManufacturerSpecific::RequestValue
(
	uint32 const _requestFlags,
	uint8 const _dummy1,	// = 0 (not used)
	uint8 const _instance,
	Driver::MsgQueue const _queue
)
{
	if( _instance != 1 )
	{
		// This command class doesn't work with multiple instances
		return false;
	}
	if ( IsGetSupported() )
	{
		Msg* msg = new Msg( "ManufacturerSpecificCmd_Get", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
		msg->Append( GetNodeId() );
		msg->Append( 2 );
		msg->Append( GetCommandClassId() );
		msg->Append( ManufacturerSpecificCmd_Get );
		msg->Append( GetDriver()->GetTransmitOptions() );
		GetDriver()->SendMsg( msg, _queue );
		return true;
	} else {
		Log::Write(  LogLevel_Info, GetNodeId(), "ManufacturerSpecificCmd_Get Not Supported on this node");
	}
	return false;
}
开发者ID:FrozenCow,项目名称:node-openzwave,代码行数:32,代码来源:ManufacturerSpecific.cpp

示例6: Msg

//-----------------------------------------------------------------------------
// <AssociationCommandConfiguration::RequestValue>												   
// Request current value from the device									   
//-----------------------------------------------------------------------------
void AssociationCommandConfiguration::RequestValue
(
	uint8 const _dummy1,	// = 0 (not used)
	uint8 const _dummy2		// = 0 (not used)
)
{
	Msg* msg = new Msg( "AssociationCommandConfigurationCmd_SupportedRecordsGet", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
	msg->Append( GetNodeId() );
	msg->Append( 2 );
	msg->Append( GetCommandClassId() );
	msg->Append( AssociationCommandConfigurationCmd_SupportedRecordsGet );
	msg->Append( TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE );
	GetDriver()->SendMsg( msg );
}
开发者ID:buzzdavidson,项目名称:py-openzwave,代码行数:18,代码来源:AssociationCommandConfiguration.cpp

示例7: Msg

//-----------------------------------------------------------------------------
// <SensorBinary::RequestValue>												   
// Request current value from the device									   
//-----------------------------------------------------------------------------
void SensorBinary::RequestValue
(
	uint8 const _dummy1,	// = 0 (not used)
	uint8 const _dummy2		// = 0 (not used)
)
{
	Msg* msg = new Msg( "SensorBinaryCmd_Get", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
	msg->Append( GetNodeId() );
	msg->Append( 2 );
	msg->Append( GetCommandClassId() );
	msg->Append( SensorBinaryCmd_Get );
	msg->Append( TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE );
	GetDriver()->SendMsg( msg );
}
开发者ID:buzzdavidson,项目名称:py-openzwave,代码行数:18,代码来源:SensorBinary.cpp

示例8: Msg

//-----------------------------------------------------------------------------
// <ThermostatOperatingState::RequestValue>
// Get a thermostat mode value from the device
//-----------------------------------------------------------------------------
void ThermostatOperatingState::RequestValue
(
	uint8 const _dummy1,	// = 0 (not used)
	uint8 const _dummy2		// = 0 (not used)
)
{
	Msg* msg = new Msg( "Request Current Thermostat Operating State", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
	msg->Append( GetNodeId() );
	msg->Append( 2 );
	msg->Append( GetCommandClassId() );
	msg->Append( ThermostatOperatingStateCmd_Get );
	msg->Append( TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE );
	GetDriver()->SendMsg( msg );
}
开发者ID:buzzdavidson,项目名称:py-openzwave,代码行数:18,代码来源:ThermostatOperatingState.cpp

示例9: Msg

bool Security::Init
(
)
{
	Msg* msg = new Msg( "SecurityCmd_SupportedGet", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
	msg->Append( GetNodeId() );
	msg->Append( 2 );
	msg->Append( GetCommandClassId() );
	msg->Append( SecurityCmd_SupportedGet );
	msg->Append( GetDriver()->GetTransmitOptions() );
	msg->setEncrypted();
	GetDriver()->SendMsg( msg, Driver::MsgQueue_Security);
	return true;
}
开发者ID:Yadoms,项目名称:yadoms,代码行数:14,代码来源:Security.cpp

示例10: Msg

//-----------------------------------------------------------------------------
// <SwitchAll::On>
// Send a command to switch all devices on
//-----------------------------------------------------------------------------
void SwitchAll::On
(
	Driver* _driver,
	uint8 const _nodeId
)
{
	Log::Write( LogLevel_Info, _nodeId, "SwitchAll::On (Node=%d)", _nodeId );
	Msg* msg = new Msg( "SwitchAllCmd_On", _nodeId, REQUEST, FUNC_ID_ZW_SEND_DATA, true );
	msg->Append( _nodeId );
	msg->Append( 2 );
	msg->Append( StaticGetCommandClassId() );
	msg->Append( SwitchAllCmd_On );
	msg->Append( _driver->GetTransmitOptions() );
	_driver->SendMsg( msg, Driver::MsgQueue_Send );
}
开发者ID:1337bacon,项目名称:open-zwave,代码行数:19,代码来源:SwitchAll.cpp

示例11: GetNodeId

//-----------------------------------------------------------------------------
// <SwitchToggleBinary::SetValue>
// Toggle the state of the switch
//-----------------------------------------------------------------------------
bool SwitchToggleBinary::SetValue
(
	Value const& _value
)
{
	Log::Write( "SwitchToggleBinary::Set - Toggling the state of node %d", GetNodeId() );
	Msg* msg = new Msg( "SwitchToggleBinary Set", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true );		
	msg->Append( GetNodeId() );
	msg->Append( 2 );
	msg->Append( GetCommandClassId() );
	msg->Append( SwitchToggleBinaryCmd_Set );
	msg->Append( TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE );
	GetDriver()->SendMsg( msg );
	return true;
}
开发者ID:buzzdavidson,项目名称:py-openzwave,代码行数:19,代码来源:SwitchToggleBinary.cpp

示例12: Msg

//-----------------------------------------------------------------------------
// <SwitchAll::On>
// Send a command to switch all devices on 
//-----------------------------------------------------------------------------
void SwitchAll::On
(
	Driver* _driver,
	uint8 const _nodeId 
)
{
	Log::Write( "SwitchAll::On (Node=%d)", _nodeId );
	Msg* msg = new Msg( "SwitchAllCmd_On", _nodeId, REQUEST, FUNC_ID_ZW_SEND_DATA, true );		
	msg->Append( _nodeId );
	msg->Append( 2 );
	msg->Append( StaticGetCommandClassId() );
	msg->Append( SwitchAllCmd_On );
	msg->Append( TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE );
    _driver->SendMsg( msg );
}
开发者ID:buzzdavidson,项目名称:py-openzwave,代码行数:19,代码来源:SwitchAll.cpp

示例13: GetNodeId

//-----------------------------------------------------------------------------
// <SwitchMultilevel::StopLevelChange>
// Stop the level changing
//-----------------------------------------------------------------------------
bool SwitchMultilevel::StopLevelChange
(
	uint8 const _instance
)
{
	Log::Write( LogLevel_Info, GetNodeId(), "SwitchMultilevel::StopLevelChange - Stopping the level change" );
	Msg* msg = new Msg( "SwitchMultilevel StopLevelChange", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true );		
	msg->SetInstance( this, _instance );
	msg->Append( GetNodeId() );
	msg->Append( 2 );
	msg->Append( GetCommandClassId() );
	msg->Append( SwitchMultilevelCmd_StopLevelChange );
	msg->Append( GetDriver()->GetTransmitOptions() );
	GetDriver()->SendMsg( msg, Driver::MsgQueue_Send );
	return true;
}
开发者ID:PushOk,项目名称:OpenZWave,代码行数:20,代码来源:SwitchMultilevel.cpp

示例14: GetNodeId

//-----------------------------------------------------------------------------
// <SwitchToggleBinary::SetValue>
// Toggle the state of the switch
//-----------------------------------------------------------------------------
bool SwitchToggleBinary::SetValue
(
	Value const& _value
)
{
	Log::Write( LogLevel_Info, GetNodeId(), "SwitchToggleBinary::Set - Toggling the state" );
	Msg* msg = new Msg( "SwitchToggleBinary Set", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true );		
	msg->SetInstance( this, _value.GetID().GetInstance() );
	msg->Append( GetNodeId() );
	msg->Append( 2 );
	msg->Append( GetCommandClassId() );
	msg->Append( SwitchToggleBinaryCmd_Set );
	msg->Append( TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE );
	GetDriver()->SendMsg( msg, Driver::MsgQueue_Send );
	return true;
}
开发者ID:NhaTrang,项目名称:ansible,代码行数:20,代码来源:SwitchToggleBinary.cpp

示例15: Msg

//-----------------------------------------------------------------------------
// <SwitchToggleBinary::RequestValue>												   
// Request current value from the device									   
//-----------------------------------------------------------------------------
bool SwitchToggleBinary::RequestValue
(
	uint32 const _requestFlags,
	uint8 const _dummy1,	// = 0 (not used)
	uint8 const _instance,
	Driver::MsgQueue const _queue
)
{
	Msg* msg = new Msg( "SwitchToggleBinaryCmd_Get", GetNodeId(), REQUEST, FUNC_ID_ZW_SEND_DATA, true, true, FUNC_ID_APPLICATION_COMMAND_HANDLER, GetCommandClassId() );
	msg->SetInstance( this, _instance );
	msg->Append( GetNodeId() );
	msg->Append( 2 );
	msg->Append( GetCommandClassId() );
	msg->Append( SwitchToggleBinaryCmd_Get );
	msg->Append( TRANSMIT_OPTION_ACK | TRANSMIT_OPTION_AUTO_ROUTE );
	GetDriver()->SendMsg( msg, _queue );
	return true;
}
开发者ID:NhaTrang,项目名称:ansible,代码行数:22,代码来源:SwitchToggleBinary.cpp


注:本文中的Msg::Append方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。