예제 #1
0
void ofxOscSender::appendBundle( ofxOscBundle& bundle, osc::OutboundPacketStream& p )
{
	// recursively serialise the bundle
	p << osc::BeginBundleImmediate;
	for ( int i=0; i<bundle.getBundleCount(); i++ )
	{
		appendBundle( bundle.getBundleAt( i ), p );
	}
	for ( int i=0; i<bundle.getMessageCount(); i++ )
	{
		appendMessage( bundle.getMessageAt( i ), p );
	}
	p << osc::EndBundle;
}
예제 #2
0
파일: ofxDaito.cpp 프로젝트: imclab/facepp
void ofxDaito::addMessage(string address, ofVec2f data) {
	ofxOscMessage msg;
	msg.setAddress(address);
	msg.addFloatArg(data.x);
	msg.addFloatArg(data.y);
	bundle.addMessage(msg);
}
예제 #3
0
void ofxOscSender::appendParameter( ofxOscBundle & _bundle, const ofAbstractParameter & parameter, string address){
	if(parameter.type()==typeid(ofParameterGroup).name()){
		ofxOscBundle bundle;
		const ofParameterGroup & group = static_cast<const ofParameterGroup &>(parameter);
		for(std::size_t i=0;i<group.size();i++){
			const ofAbstractParameter & p = group[i];
			if(p.isSerializable()){
				appendParameter(bundle,p,address+group.getEscapedName()+"/");
			}
		}
		_bundle.addBundle(bundle);
	}else{
		if(parameter.isSerializable()){
			ofxOscMessage msg;
			appendParameter(msg,parameter,address);
			_bundle.addMessage(msg);
		}
	}
}
예제 #4
0
파일: ofxDaito.cpp 프로젝트: imclab/facepp
void ofxDaito::addMessage(string address, int data) {
	ofxOscMessage msg;
	msg.setAddress(address);
	msg.addIntArg(data);
	bundle.addMessage(msg);
}
예제 #5
0
파일: ofxDaito.cpp 프로젝트: imclab/facepp
void ofxDaito::clearBundle() {
	bundle.clear();
}