Changeset 33:080fa73274f8 in xplra for src/client/c/hu/varadiistvan/xplra/MultiGetter.cc
- Timestamp:
- 02/09/13 11:19:09 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/client/c/hu/varadiistvan/xplra/MultiGetter.cc
r22 r33 99 99 xplane.checkResult(); 100 100 101 for(vector<DataRef>::const_iterator i = dataRefs.begin(); 102 i!=dataRefs.end(); ++i) 103 { 104 xplane.checkStream(); 105 const DataRef& dataRef = *i; 106 read(dataRef); 107 } 101 readValues(); 108 102 } 109 103 … … 113 107 void MultiGetter::doExecuteUnregistered() throw(Exception) 114 108 { 109 writeSpec(Protocol::COMMAND_GET_MULTI); 110 111 readValues(); 112 } 113 114 //------------------------------------------------------------------------------ 115 116 void MultiGetter::readValues() throw(Exception) 117 { 115 118 for(vector<DataRef>::const_iterator i = dataRefs.begin(); 116 119 i!=dataRefs.end(); ++i) 117 120 { 121 xplane.checkStream(); 118 122 const DataRef& dataRef = *i; 119 xplane.stream->writeU8(Protocol::COMMAND_GET_SINGLE);120 xplane.stream->writeString(dataRef.name);121 xplane.stream->writeU8(dataRef.type);122 if (dataRef.isArray()) {123 xplane.stream->writeS32(dataRef.length);124 xplane.stream->writeS32(dataRef.offset);125 }126 xplane.stream->flush();127 xplane.checkResult();128 123 read(dataRef); 129 124 }
Note:
See TracChangeset
for help on using the changeset viewer.