本文整理汇总了C++中Console::NoteLn方法的典型用法代码示例。如果您正苦于以下问题:C++ Console::NoteLn方法的具体用法?C++ Console::NoteLn怎么用?C++ Console::NoteLn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Console
的用法示例。
在下文中一共展示了Console::NoteLn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExecuteGlobal
bool INDIDeviceControllerInstance::ExecuteGlobal()
{
Console console;
Exception::DisableGUIOutput();
INDIClient* indi = INDIClient::TheClient();
try
{
if ( p_serverConnect )
{
if ( indi == nullptr )
{
indi = INDIClient::NewClient( p_serverHostName.ToUTF8(), p_serverPort );
if ( p_verbosity > 0 )
{
console.NoteLn( "<end><cbr>INDI Control Client --- (C) Klaus Kretzschmar, 2014-2016" );
console.Flush();
}
}
indi->SetVerbosity( p_verbosity );
if ( !indi->IsServerConnected() )
{
indi->connectServer();
if ( !indi->IsServerConnected() )
throw Error( "INDIDeviceControllerInstance: Failure to connect to INDI server " + p_serverHostName + ", port=" + String( p_serverPort ) );
if ( p_verbosity > 0 )
{
console.NoteLn( "* Successfully connected to INDI server " + p_serverHostName + ", port=" + String( p_serverPort ) );
console.Flush();
}
}
if ( !p_serverCommand.IsEmpty() )
{
console.EnableAbort();
if ( p_serverCommand == "GET" )
{
o_getCommandResult.Clear();
String device( PropertyUtils::Device( p_getCommandParameters ) );
String property( PropertyUtils::Property( p_getCommandParameters ) );
String element( PropertyUtils::Element( p_getCommandParameters ) );
INDIPropertyListItem item;
if ( !indi->GetPropertyItem( device, property, element, item ) )
throw Error( "INDIDeviceControllerInstance: Could not get value of property '" + String( p_getCommandParameters ) + "'" );
o_getCommandResult = item.PropertyValue;
if ( p_verbosity > 1 )
console.WriteLn( "<end><cbr>Device=" + device +
", Property=" + property +
", Element=" + element +
", Value=" + o_getCommandResult );
}
else if ( p_serverCommand == "SET" )
{
for ( auto newProperty : p_newProperties )
{
GetNewPropertyListItemParametersFromKey( newProperty );
if ( !indi->SendNewPropertyItem( newProperty, false/*async*/ ) )
throw Error( "INDIDeviceControllerInstance: Failure to send new property values." );
}
p_newProperties.Clear();
}
else if ( p_serverCommand == "SET_ASYNC" )
{
for ( auto newProperty : p_newProperties )
{
GetNewPropertyListItemParametersFromKey( newProperty );
if ( !indi->SendNewPropertyItem( newProperty, true/*async*/ ) )
throw Error( "INDIDeviceControllerInstance: Failure to send new property values (asynchronous)." );
}
p_newProperties.Clear();
}
else
throw Error( "INDIDeviceControllerInstance: Unknown command '" + p_serverCommand + "'" );
console.Flush();
}
AcquireINDIClientProperties();
}
else
{
if ( indi != nullptr )
{
if ( indi->IsServerConnected() )
{
AcquireINDIClientProperties();
indi->SetVerbosity( p_verbosity );
indi->disconnectServer();
if ( p_verbosity > 0 )
console.NoteLn( "* Disconnected from INDI server " + p_serverHostName + ", port=" + String( p_serverPort ) );
}
INDIClient::DestroyClient();
}
//.........这里部分代码省略.........