本文整理汇总了C++中ofxOscMessage::getArgAsInt64方法的典型用法代码示例。如果您正苦于以下问题:C++ ofxOscMessage::getArgAsInt64方法的具体用法?C++ ofxOscMessage::getArgAsInt64怎么用?C++ ofxOscMessage::getArgAsInt64使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofxOscMessage
的用法示例。
在下文中一共展示了ofxOscMessage::getArgAsInt64方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: appendMessage
void ofxOscSender::appendMessage( ofxOscMessage& message, osc::OutboundPacketStream& p )
{
p << osc::BeginMessage( message.getAddress().c_str() );
for ( int i=0; i< message.getNumArgs(); ++i )
{
if ( message.getArgType(i) == OFXOSC_TYPE_INT32 )
p << message.getArgAsInt32( i );
else if ( message.getArgType(i) == OFXOSC_TYPE_INT64 )
p << (osc::int64)message.getArgAsInt64( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_FLOAT )
p << message.getArgAsFloat( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_STRING )
p << message.getArgAsString( i ).c_str();
else
{
ofLogError() << "bad argument type" + ofToString(message.getArgType( i ));
assert( false );
}
}
p << osc::EndMessage;
}
示例2: appendMessage
void ofxGstRTPServer::appendMessage( ofxOscMessage& message, osc::OutboundPacketStream& p )
{
p << osc::BeginMessage( message.getAddress().c_str() );
for ( int i=0; i< message.getNumArgs(); ++i )
{
if ( message.getArgType(i) == OFXOSC_TYPE_INT32 )
p << message.getArgAsInt32( i );
else if ( message.getArgType(i) == OFXOSC_TYPE_INT64 )
p << (osc::int64)message.getArgAsInt64( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_FLOAT )
p << message.getArgAsFloat( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_STRING )
p << message.getArgAsString( i ).c_str();
else
{
ofLogError("ofxOscSender") << "appendMessage(): bad argument type " << message.getArgType( i );
}
//cout << i << ": " << p.Size() << endl;
}
p << osc::EndMessage;
}
示例3: displayOscMessage
void Ableton::displayOscMessage(ofxOscMessage &m)
{
cout << "address : "<< m.getAddress() << endl;
for (int i = 0; i < m.getNumArgs(); i++)
{
if (m.getArgType(i) == OFXOSC_TYPE_INT32) {
cout << " i--> "<<m.getArgAsInt32(i)<<endl;
}
else if (m.getArgType(i) == OFXOSC_TYPE_INT64) {
cout << " j--> "<<m.getArgAsInt64(i)<<endl;
}
else if (m.getArgType(i) == OFXOSC_TYPE_FLOAT) {
cout << " f--> "<<m.getArgAsFloat(i)<<endl;
}
else if (m.getArgType(i) == OFXOSC_TYPE_STRING) {
cout << " s--> "<<m.getArgAsString(i)<<endl;
}
else if (m.getArgType(i) == OFXOSC_TYPE_BLOB) {
cout << " b--> "<<m.getArgAsBlob(i)<<endl;
}
}
}
示例4: appendMessage
void ofApp::appendMessage( ofxOscMessage& message, osc::OutboundPacketStream& p )
{
p << osc::BeginMessage( message.getAddress().c_str() );
for ( int i=0; i< message.getNumArgs(); ++i )
{
if ( message.getArgType(i) == OFXOSC_TYPE_INT32 )
p << message.getArgAsInt32( i );
else if ( message.getArgType(i) == OFXOSC_TYPE_INT64 )
p << (osc::int64)message.getArgAsInt64( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_FLOAT )
p << message.getArgAsFloat( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_DOUBLE )
p << message.getArgAsDouble( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_STRING || message.getArgType( i ) == OFXOSC_TYPE_SYMBOL)
p << message.getArgAsString( i ).c_str();
else if ( message.getArgType( i ) == OFXOSC_TYPE_CHAR )
p << message.getArgAsChar( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_MIDI_MESSAGE )
p << message.getArgAsMidiMessage( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_TRUE || message.getArgType( i ) == OFXOSC_TYPE_FALSE )
p << message.getArgAsBool( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_TRIGGER )
p << message.getArgAsTrigger( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_TIMETAG )
p << (osc::int64)message.getArgAsTimetag( i );
//else if ( message.getArgType( i ) == OFXOSC_TYPE_RGBA_COLOR )
// p << message.getArgAsRgbaColor( i );
else if ( message.getArgType( i ) == OFXOSC_TYPE_BLOB ){
ofBuffer buff = message.getArgAsBlob(i);
osc::Blob b(buff.getData(), (unsigned long)buff.size());
p << b;
}else
{
ofLogError("ofxOscSender") << "appendMessage(): bad argument type " << message.getArgType( i );
assert( false );
}
}
p << osc::EndMessage;
}
示例5: messageArgToCommandArg
static CommandArg messageArgToCommandArg(const ofxOscMessage& message,
int i) {
auto type = message.getArgType(i);
switch (type) {
case OFXOSC_TYPE_INT32:
return message.getArgAsInt32(i);
break;
case OFXOSC_TYPE_INT64:
return message.getArgAsInt64(i);
case OFXOSC_TYPE_FLOAT:
return message.getArgAsFloat(i);
case OFXOSC_TYPE_DOUBLE:
return message.getArgAsDouble(i);
case OFXOSC_TYPE_STRING:
case OFXOSC_TYPE_SYMBOL:
return message.getArgAsString(i);
case OFXOSC_TYPE_TRUE:
return true;
case OFXOSC_TYPE_FALSE:
return false;
default:
break;
}
}