Esempio n. 1
0
void NetStreamSender::stepBegins(const string & source_id, long time_id, double timestamp){
  NetStreamStorage event = NetStreamStorage();
  event.writeByte(EVENT_STEP);
  event.writeString(source_id);
  event.writeLong(time_id);
  event.writeDouble(timestamp);
  _sendEvent(event);
}
void NetStreamSender::stepBegins(const GS_STRING & source_id, GS_LONG time_id, GS_DOUBLE timestamp){
  NetStreamStorage event = NetStreamStorage();
  event.writeByte(EVENT_STEP);
  event.writeString(source_id);
  event.writeUnsignedVarInt(time_id);
  event.writeDouble(timestamp);
  _sendEvent(event);
}
Esempio n. 3
0
void NetStreamSender::_encode(NetStreamStorage & event, const vector<double> &  value){
  event.writeInt(value.size());
  for(vector<double>::const_iterator i = value.begin(); i != value.end(); i++){
    event.writeDouble((*i));
  }
}
Esempio n. 4
0
void NetStreamSender::_encode(NetStreamStorage & event, double value){
  event.writeDouble(value);
}