Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated API to OpenZWave main trunk rev.466

  • Loading branch information...
commit 3e7c24a352cba0eeccfe86701f433087498c3a4c 1 parent 028c692
Elias Karakoulakis authored
View
92 Main.cpp
@@ -372,7 +372,8 @@ int main(int argc, char *argv[]) {
return 1;
}
}
- catch (exception& e) {
+ catch (exception& e)
+ {
cerr << "Error parsing options: " << e.what() << "\n";
return 2;
}
@@ -382,48 +383,65 @@ int main(int argc, char *argv[]) {
// connect to STOMP server in order to send openzwave notifications
stomp_client = new STOMP::PocoStomp(stomp_host, stomp_port);
stomp_client->connect();
- } catch (exception& e) {
+ }
+ catch (exception& e)
+ {
cerr << "Error connecting to STOMP: " << e.what() << "\n";
return 3;
}
// OpenZWave initialization
//initMutex.lock();
+ try {
+ // Create the OpenZWave Manager.
+ // The first argument is the path to the config files (where the manufacturer_specific.xml file is located
+ // The second argument is the path for saved Z-Wave network state and the log file. If you leave it NULL
+ // the log file will appear in the program's working directory.
+ Options::Create(ozw_config_dir, ozw_user, "" );
+ Options::Get()->Lock();
+
+ Manager::Create();
+
+ // Add a callback handler to the manager.
+ Manager::Get()->AddWatcher( OnNotification, NULL );
+
+ // Add a Z-Wave Driver
+ Manager::Get()->AddDriver( ozw_port );
+ //Manager::Get()->AddDriver( "HID Controller", Driver::ControllerInterface_Hid );
+ }
+ catch (exception& e)
+ {
+ cerr << "Error initializing OpenZWave: " << e.what() << "\n";
+ return 4;
+ }
+
+ try {
+ // THRIFT: initialize RemoteManager
+ shared_ptr<RemoteManagerHandler> handler(new RemoteManagerHandler());
+ shared_ptr<TProcessor> processor(new RemoteManagerProcessor(handler));
+ TServerSocket* ss = new TServerSocket(thrift_port);
+ ss->setRecvTimeout(3000);
+ shared_ptr<TServerTransport> serverTransport(ss);
+ shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
+ shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
+ TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
+
+ // Now we just wait for the driver to become ready, and then write out the loaded config.
+ boost::unique_lock<boost::mutex> initLock(initMutex);
+ initCond.wait(initLock);
+ usleep(500);
+ cout << "------------------------------------------------------------------------" << endl;
+ cout << "OpenZWave is initialized, Thrift interface now listening on port " << thrift_port << endl;
+ cout << "------------------------------------------------------------------------" << endl;
+
+ server.serve();
+
+ }
+ catch (exception& e)
+ {
+ cerr << "Exception in OpenZWave Thrift server: " << e.what() << "\n";
+ return 5;
+ }
- // Create the OpenZWave Manager.
- // The first argument is the path to the config files (where the manufacturer_specific.xml file is located
- // The second argument is the path for saved Z-Wave network state and the log file. If you leave it NULL
- // the log file will appear in the program's working directory.
- Options::Create(ozw_config_dir, ozw_user, "" );
- Options::Get()->Lock();
-
- Manager::Create();
-
- // Add a callback handler to the manager.
- Manager::Get()->AddWatcher( OnNotification, NULL );
-
- // Add a Z-Wave Driver
- Manager::Get()->AddDriver( ozw_port );
- //Manager::Get()->AddDriver( "HID Controller", Driver::ControllerInterface_Hid );
-
- // THRIFT: initialize RemoteManager
- shared_ptr<RemoteManagerHandler> handler(new RemoteManagerHandler());
- shared_ptr<TProcessor> processor(new RemoteManagerProcessor(handler));
- TServerSocket* ss = new TServerSocket(thrift_port);
- ss->setRecvTimeout(3000);
- shared_ptr<TServerTransport> serverTransport(ss);
- shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
- shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
- TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
-
- // Now we just wait for the driver to become ready, and then write out the loaded config.
- boost::unique_lock<boost::mutex> initLock(initMutex);
- initCond.wait(initLock);
- usleep(500);
- cout << "------------------------------------------------------------------------" << endl;
- cout << "OpenZWave is initialized, Thrift interface now listening on port " << thrift_port << endl;
- cout << "------------------------------------------------------------------------" << endl;
- // start up the Thrift RemoteManager server
- server.serve();
return 0;
}
View
6 gen-cocoa/ozw.h
@@ -645,10 +645,11 @@ enum OpenZWaveDriverControllerCommand {
- (int32_t) GetSendQueueCount: (int32_t) _homeId; // throws TException
- (void) LogDriverStatistics: (int32_t) _homeId; // throws TException
- (int32_t) GetPollInterval; // throws TException
-- (void) SetPollInterval: (int32_t) _seconds; // throws TException
-- (BOOL) EnablePoll: (OpenZWaveRemoteValueID *) _valueId; // throws TException
+- (void) SetPollInterval: (int32_t) _milliseconds : (BOOL) _bIntervalBetweenPolls; // throws TException
+- (BOOL) EnablePoll: (OpenZWaveRemoteValueID *) _valueId : (uint8_t) _intensity; // throws TException
- (BOOL) DisablePoll: (OpenZWaveRemoteValueID *) _valueId; // throws TException
- (BOOL) isPolled: (OpenZWaveRemoteValueID *) _valueId; // throws TException
+- (void) SetPollIntensity: (OpenZWaveRemoteValueID *) _valueId : (uint8_t) _intensity; // throws TException
- (BOOL) RefreshNodeInfo: (int32_t) _homeId : (uint8_t) _nodeId; // throws TException
- (BOOL) RequestNodeState: (int32_t) _homeId : (uint8_t) _nodeId; // throws TException
- (BOOL) RequestNodeDynamic: (int32_t) _homeId : (uint8_t) _nodeId; // throws TException
@@ -692,6 +693,7 @@ enum OpenZWaveDriverControllerCommand {
- (BOOL) IsValueReadOnly: (OpenZWaveRemoteValueID *) _id; // throws TException
- (BOOL) IsValueWriteOnly: (OpenZWaveRemoteValueID *) _id; // throws TException
- (BOOL) IsValueSet: (OpenZWaveRemoteValueID *) _id; // throws TException
+- (BOOL) IsValuePolled: (OpenZWaveRemoteValueID *) _id; // throws TException
- (OpenZWaveBool_Bool *) GetValueAsBool: (OpenZWaveRemoteValueID *) _id; // throws TException
- (OpenZWaveBool_UInt8 *) GetValueAsByte: (OpenZWaveRemoteValueID *) _id; // throws TException
- (OpenZWaveBool_Float *) GetValueAsFloat: (OpenZWaveRemoteValueID *) _id; // throws TException
View
1,579 gen-cocoa/ozw.m
1,159 additions, 420 deletions not shown
View
588 gen-cpp/RemoteManager.cpp
@@ -1553,8 +1553,16 @@ uint32_t RemoteManager_SetPollInterval_args::read(::apache::thrift::protocol::TP
{
case 1:
if (ftype == ::apache::thrift::protocol::T_I32) {
- xfer += iprot->readI32(this->_seconds);
- this->__isset._seconds = true;
+ xfer += iprot->readI32(this->_milliseconds);
+ this->__isset._milliseconds = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->_bIntervalBetweenPolls);
+ this->__isset._bIntervalBetweenPolls = true;
} else {
xfer += iprot->skip(ftype);
}
@@ -1574,8 +1582,11 @@ uint32_t RemoteManager_SetPollInterval_args::read(::apache::thrift::protocol::TP
uint32_t RemoteManager_SetPollInterval_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("RemoteManager_SetPollInterval_args");
- xfer += oprot->writeFieldBegin("_seconds", ::apache::thrift::protocol::T_I32, 1);
- xfer += oprot->writeI32(this->_seconds);
+ xfer += oprot->writeFieldBegin("_milliseconds", ::apache::thrift::protocol::T_I32, 1);
+ xfer += oprot->writeI32(this->_milliseconds);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("_bIntervalBetweenPolls", ::apache::thrift::protocol::T_BOOL, 2);
+ xfer += oprot->writeBool(this->_bIntervalBetweenPolls);
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
@@ -1585,8 +1596,11 @@ uint32_t RemoteManager_SetPollInterval_args::write(::apache::thrift::protocol::T
uint32_t RemoteManager_SetPollInterval_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
uint32_t xfer = 0;
xfer += oprot->writeStructBegin("RemoteManager_SetPollInterval_pargs");
- xfer += oprot->writeFieldBegin("_seconds", ::apache::thrift::protocol::T_I32, 1);
- xfer += oprot->writeI32((*(this->_seconds)));
+ xfer += oprot->writeFieldBegin("_milliseconds", ::apache::thrift::protocol::T_I32, 1);
+ xfer += oprot->writeI32((*(this->_milliseconds)));
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("_bIntervalBetweenPolls", ::apache::thrift::protocol::T_BOOL, 2);
+ xfer += oprot->writeBool((*(this->_bIntervalBetweenPolls)));
xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
@@ -1696,6 +1710,14 @@ uint32_t RemoteManager_EnablePoll_args::read(::apache::thrift::protocol::TProtoc
xfer += iprot->skip(ftype);
}
break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_BYTE) {
+ xfer += iprot->readByte(this->_intensity);
+ this->__isset._intensity = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
default:
xfer += iprot->skip(ftype);
break;
@@ -1714,6 +1736,9 @@ uint32_t RemoteManager_EnablePoll_args::write(::apache::thrift::protocol::TProto
xfer += oprot->writeFieldBegin("_valueId", ::apache::thrift::protocol::T_STRUCT, 1);
xfer += this->_valueId.write(oprot);
xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("_intensity", ::apache::thrift::protocol::T_BYTE, 2);
+ xfer += oprot->writeByte(this->_intensity);
+ xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -1725,6 +1750,9 @@ uint32_t RemoteManager_EnablePoll_pargs::write(::apache::thrift::protocol::TProt
xfer += oprot->writeFieldBegin("_valueId", ::apache::thrift::protocol::T_STRUCT, 1);
xfer += (*(this->_valueId)).write(oprot);
xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("_intensity", ::apache::thrift::protocol::T_BYTE, 2);
+ xfer += oprot->writeByte((*(this->_intensity)));
+ xfer += oprot->writeFieldEnd();
xfer += oprot->writeFieldStop();
xfer += oprot->writeStructEnd();
return xfer;
@@ -2142,6 +2170,157 @@ uint32_t RemoteManager_isPolled_presult::read(::apache::thrift::protocol::TProto
return xfer;
}
+uint32_t RemoteManager_SetPollIntensity_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->_valueId.read(iprot);
+ this->__isset._valueId = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ case 2:
+ if (ftype == ::apache::thrift::protocol::T_BYTE) {
+ xfer += iprot->readByte(this->_intensity);
+ this->__isset._intensity = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t RemoteManager_SetPollIntensity_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("RemoteManager_SetPollIntensity_args");
+ xfer += oprot->writeFieldBegin("_valueId", ::apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->_valueId.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("_intensity", ::apache::thrift::protocol::T_BYTE, 2);
+ xfer += oprot->writeByte(this->_intensity);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t RemoteManager_SetPollIntensity_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("RemoteManager_SetPollIntensity_pargs");
+ xfer += oprot->writeFieldBegin("_valueId", ::apache::thrift::protocol::T_STRUCT, 1);
+ xfer += (*(this->_valueId)).write(oprot);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldBegin("_intensity", ::apache::thrift::protocol::T_BYTE, 2);
+ xfer += oprot->writeByte((*(this->_intensity)));
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t RemoteManager_SetPollIntensity_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t RemoteManager_SetPollIntensity_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+ uint32_t xfer = 0;
+
+ xfer += oprot->writeStructBegin("RemoteManager_SetPollIntensity_result");
+
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t RemoteManager_SetPollIntensity_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
uint32_t RemoteManager_RefreshNodeInfo_args::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
@@ -9300,6 +9479,164 @@ uint32_t RemoteManager_IsValueSet_presult::read(::apache::thrift::protocol::TPro
return xfer;
}
+uint32_t RemoteManager_IsValuePolled_args::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 1:
+ if (ftype == ::apache::thrift::protocol::T_STRUCT) {
+ xfer += this->_id.read(iprot);
+ this->__isset._id = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t RemoteManager_IsValuePolled_args::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("RemoteManager_IsValuePolled_args");
+ xfer += oprot->writeFieldBegin("_id", ::apache::thrift::protocol::T_STRUCT, 1);
+ xfer += this->_id.write(oprot);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t RemoteManager_IsValuePolled_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const {
+ uint32_t xfer = 0;
+ xfer += oprot->writeStructBegin("RemoteManager_IsValuePolled_pargs");
+ xfer += oprot->writeFieldBegin("_id", ::apache::thrift::protocol::T_STRUCT, 1);
+ xfer += (*(this->_id)).write(oprot);
+ xfer += oprot->writeFieldEnd();
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t RemoteManager_IsValuePolled_result::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 0:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool(this->success);
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
+uint32_t RemoteManager_IsValuePolled_result::write(::apache::thrift::protocol::TProtocol* oprot) const {
+
+ uint32_t xfer = 0;
+
+ xfer += oprot->writeStructBegin("RemoteManager_IsValuePolled_result");
+
+ if (this->__isset.success) {
+ xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0);
+ xfer += oprot->writeBool(this->success);
+ xfer += oprot->writeFieldEnd();
+ }
+ xfer += oprot->writeFieldStop();
+ xfer += oprot->writeStructEnd();
+ return xfer;
+}
+
+uint32_t RemoteManager_IsValuePolled_presult::read(::apache::thrift::protocol::TProtocol* iprot) {
+
+ uint32_t xfer = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TType ftype;
+ int16_t fid;
+
+ xfer += iprot->readStructBegin(fname);
+
+ using ::apache::thrift::protocol::TProtocolException;
+
+
+ while (true)
+ {
+ xfer += iprot->readFieldBegin(fname, ftype, fid);
+ if (ftype == ::apache::thrift::protocol::T_STOP) {
+ break;
+ }
+ switch (fid)
+ {
+ case 0:
+ if (ftype == ::apache::thrift::protocol::T_BOOL) {
+ xfer += iprot->readBool((*(this->success)));
+ this->__isset.success = true;
+ } else {
+ xfer += iprot->skip(ftype);
+ }
+ break;
+ default:
+ xfer += iprot->skip(ftype);
+ break;
+ }
+ xfer += iprot->readFieldEnd();
+ }
+
+ xfer += iprot->readStructEnd();
+
+ return xfer;
+}
+
uint32_t RemoteManager_GetValueAsBool_args::read(::apache::thrift::protocol::TProtocol* iprot) {
uint32_t xfer = 0;
@@ -22698,19 +23035,20 @@ int32_t RemoteManagerClient::recv_GetPollInterval()
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "GetPollInterval failed: unknown result");
}
-void RemoteManagerClient::SetPollInterval(const int32_t _seconds)
+void RemoteManagerClient::SetPollInterval(const int32_t _milliseconds, const bool _bIntervalBetweenPolls)
{
- send_SetPollInterval(_seconds);
+ send_SetPollInterval(_milliseconds, _bIntervalBetweenPolls);
recv_SetPollInterval();
}
-void RemoteManagerClient::send_SetPollInterval(const int32_t _seconds)
+void RemoteManagerClient::send_SetPollInterval(const int32_t _milliseconds, const bool _bIntervalBetweenPolls)
{
int32_t cseqid = 0;
oprot_->writeMessageBegin("SetPollInterval", ::apache::thrift::protocol::T_CALL, cseqid);
RemoteManager_SetPollInterval_pargs args;
- args._seconds = &_seconds;
+ args._milliseconds = &_milliseconds;
+ args._bIntervalBetweenPolls = &_bIntervalBetweenPolls;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -22751,19 +23089,20 @@ void RemoteManagerClient::recv_SetPollInterval()
return;
}
-bool RemoteManagerClient::EnablePoll(const RemoteValueID& _valueId)
+bool RemoteManagerClient::EnablePoll(const RemoteValueID& _valueId, const int8_t _intensity)
{
- send_EnablePoll(_valueId);
+ send_EnablePoll(_valueId, _intensity);
return recv_EnablePoll();
}
-void RemoteManagerClient::send_EnablePoll(const RemoteValueID& _valueId)
+void RemoteManagerClient::send_EnablePoll(const RemoteValueID& _valueId, const int8_t _intensity)
{
int32_t cseqid = 0;
oprot_->writeMessageBegin("EnablePoll", ::apache::thrift::protocol::T_CALL, cseqid);
RemoteManager_EnablePoll_pargs args;
args._valueId = &_valueId;
+ args._intensity = &_intensity;
args.write(oprot_);
oprot_->writeMessageEnd();
@@ -22925,6 +23264,60 @@ bool RemoteManagerClient::recv_isPolled()
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isPolled failed: unknown result");
}
+void RemoteManagerClient::SetPollIntensity(const RemoteValueID& _valueId, const int8_t _intensity)
+{
+ send_SetPollIntensity(_valueId, _intensity);
+ recv_SetPollIntensity();
+}
+
+void RemoteManagerClient::send_SetPollIntensity(const RemoteValueID& _valueId, const int8_t _intensity)
+{
+ int32_t cseqid = 0;
+ oprot_->writeMessageBegin("SetPollIntensity", ::apache::thrift::protocol::T_CALL, cseqid);
+
+ RemoteManager_SetPollIntensity_pargs args;
+ args._valueId = &_valueId;
+ args._intensity = &_intensity;
+ args.write(oprot_);
+
+ oprot_->writeMessageEnd();
+ oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
+}
+
+void RemoteManagerClient::recv_SetPollIntensity()
+{
+
+ int32_t rseqid = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TMessageType mtype;
+
+ iprot_->readMessageBegin(fname, mtype, rseqid);
+ if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+ ::apache::thrift::TApplicationException x;
+ x.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw x;
+ }
+ if (mtype != ::apache::thrift::protocol::T_REPLY) {
+ iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ }
+ if (fname.compare("SetPollIntensity") != 0) {
+ iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ }
+ RemoteManager_SetPollIntensity_presult result;
+ result.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+
+ return;
+}
+
bool RemoteManagerClient::RefreshNodeInfo(const int32_t _homeId, const int8_t _nodeId)
{
send_RefreshNodeInfo(_homeId, _nodeId);
@@ -25410,6 +25803,64 @@ bool RemoteManagerClient::recv_IsValueSet()
throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "IsValueSet failed: unknown result");
}
+bool RemoteManagerClient::IsValuePolled(const RemoteValueID& _id)
+{
+ send_IsValuePolled(_id);
+ return recv_IsValuePolled();
+}
+
+void RemoteManagerClient::send_IsValuePolled(const RemoteValueID& _id)
+{
+ int32_t cseqid = 0;
+ oprot_->writeMessageBegin("IsValuePolled", ::apache::thrift::protocol::T_CALL, cseqid);
+
+ RemoteManager_IsValuePolled_pargs args;
+ args._id = &_id;
+ args.write(oprot_);
+
+ oprot_->writeMessageEnd();
+ oprot_->getTransport()->writeEnd();
+ oprot_->getTransport()->flush();
+}
+
+bool RemoteManagerClient::recv_IsValuePolled()
+{
+
+ int32_t rseqid = 0;
+ std::string fname;
+ ::apache::thrift::protocol::TMessageType mtype;
+
+ iprot_->readMessageBegin(fname, mtype, rseqid);
+ if (mtype == ::apache::thrift::protocol::T_EXCEPTION) {
+ ::apache::thrift::TApplicationException x;
+ x.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ throw x;
+ }
+ if (mtype != ::apache::thrift::protocol::T_REPLY) {
+ iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ }
+ if (fname.compare("IsValuePolled") != 0) {
+ iprot_->skip(::apache::thrift::protocol::T_STRUCT);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+ }
+ bool _return;
+ RemoteManager_IsValuePolled_presult result;
+ result.success = &_return;
+ result.read(iprot_);
+ iprot_->readMessageEnd();
+ iprot_->getTransport()->readEnd();
+
+ if (result.__isset.success) {
+ return _return;
+ }
+ throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "IsValuePolled failed: unknown result");
+}
+
void RemoteManagerClient::GetValueAsBool(Bool_Bool& _return, const RemoteValueID& _id)
{
send_GetValueAsBool(_id);
@@ -30444,7 +30895,7 @@ void RemoteManagerProcessor::process_SetPollInterval(int32_t seqid, ::apache::th
RemoteManager_SetPollInterval_result result;
try {
- iface_->SetPollInterval(args._seconds);
+ iface_->SetPollInterval(args._milliseconds, args._bIntervalBetweenPolls);
} catch (const std::exception& e) {
if (eventHandler_.get() != NULL) {
eventHandler_->handlerError(ctx, "RemoteManager.SetPollInterval");
@@ -30497,7 +30948,7 @@ void RemoteManagerProcessor::process_EnablePoll(int32_t seqid, ::apache::thrift:
RemoteManager_EnablePoll_result result;
try {
- result.success = iface_->EnablePoll(args._valueId);
+ result.success = iface_->EnablePoll(args._valueId, args._intensity);
result.__isset.success = true;
} catch (const std::exception& e) {
if (eventHandler_.get() != NULL) {
@@ -30636,6 +31087,59 @@ void RemoteManagerProcessor::process_isPolled(int32_t seqid, ::apache::thrift::p
}
}
+void RemoteManagerProcessor::process_SetPollIntensity(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+ void* ctx = NULL;
+ if (eventHandler_.get() != NULL) {
+ ctx = eventHandler_->getContext("RemoteManager.SetPollIntensity", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "RemoteManager.SetPollIntensity");
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preRead(ctx, "RemoteManager.SetPollIntensity");
+ }
+
+ RemoteManager_SetPollIntensity_args args;
+ args.read(iprot);
+ iprot->readMessageEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postRead(ctx, "RemoteManager.SetPollIntensity", bytes);
+ }
+
+ RemoteManager_SetPollIntensity_result result;
+ try {
+ iface_->SetPollIntensity(args._valueId, args._intensity);
+ } catch (const std::exception& e) {
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->handlerError(ctx, "RemoteManager.SetPollIntensity");
+ }
+
+ ::apache::thrift::TApplicationException x(e.what());
+ oprot->writeMessageBegin("SetPollIntensity", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+ x.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
+ return;
+ }
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preWrite(ctx, "RemoteManager.SetPollIntensity");
+ }
+
+ oprot->writeMessageBegin("SetPollIntensity", ::apache::thrift::protocol::T_REPLY, seqid);
+ result.write(oprot);
+ oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postWrite(ctx, "RemoteManager.SetPollIntensity", bytes);
+ }
+}
+
void RemoteManagerProcessor::process_RefreshNodeInfo(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
void* ctx = NULL;
@@ -32948,6 +33452,60 @@ void RemoteManagerProcessor::process_IsValueSet(int32_t seqid, ::apache::thrift:
}
}
+void RemoteManagerProcessor::process_IsValuePolled(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
+{
+ void* ctx = NULL;
+ if (eventHandler_.get() != NULL) {
+ ctx = eventHandler_->getContext("RemoteManager.IsValuePolled", callContext);
+ }
+ ::apache::thrift::TProcessorContextFreer freer(eventHandler_.get(), ctx, "RemoteManager.IsValuePolled");
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preRead(ctx, "RemoteManager.IsValuePolled");
+ }
+
+ RemoteManager_IsValuePolled_args args;
+ args.read(iprot);
+ iprot->readMessageEnd();
+ uint32_t bytes = iprot->getTransport()->readEnd();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postRead(ctx, "RemoteManager.IsValuePolled", bytes);
+ }
+
+ RemoteManager_IsValuePolled_result result;
+ try {
+ result.success = iface_->IsValuePolled(args._id);
+ result.__isset.success = true;
+ } catch (const std::exception& e) {
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->handlerError(ctx, "RemoteManager.IsValuePolled");
+ }
+
+ ::apache::thrift::TApplicationException x(e.what());
+ oprot->writeMessageBegin("IsValuePolled", ::apache::thrift::protocol::T_EXCEPTION, seqid);
+ x.write(oprot);
+ oprot->writeMessageEnd();
+ oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
+ return;
+ }
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->preWrite(ctx, "RemoteManager.IsValuePolled");
+ }
+
+ oprot->writeMessageBegin("IsValuePolled", ::apache::thrift::protocol::T_REPLY, seqid);
+ result.write(oprot);
+ oprot->writeMessageEnd();
+ bytes = oprot->getTransport()->writeEnd();
+ oprot->getTransport()->flush();
+
+ if (eventHandler_.get() != NULL) {
+ eventHandler_->postWrite(ctx, "RemoteManager.IsValuePolled", bytes);
+ }
+}
+
void RemoteManagerProcessor::process_GetValueAsBool(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext)
{
void* ctx = NULL;
View
306 gen-cpp/RemoteManager.h
@@ -24,10 +24,11 @@ class RemoteManagerIf {
virtual int32_t GetSendQueueCount(const int32_t _homeId) = 0;
virtual void LogDriverStatistics(const int32_t _homeId) = 0;
virtual int32_t GetPollInterval() = 0;
- virtual void SetPollInterval(const int32_t _seconds) = 0;
- virtual bool EnablePoll(const RemoteValueID& _valueId) = 0;
+ virtual void SetPollInterval(const int32_t _milliseconds, const bool _bIntervalBetweenPolls) = 0;
+ virtual bool EnablePoll(const RemoteValueID& _valueId, const int8_t _intensity) = 0;
virtual bool DisablePoll(const RemoteValueID& _valueId) = 0;
virtual bool isPolled(const RemoteValueID& _valueId) = 0;
+ virtual void SetPollIntensity(const RemoteValueID& _valueId, const int8_t _intensity) = 0;
virtual bool RefreshNodeInfo(const int32_t _homeId, const int8_t _nodeId) = 0;
virtual bool RequestNodeState(const int32_t _homeId, const int8_t _nodeId) = 0;
virtual bool RequestNodeDynamic(const int32_t _homeId, const int8_t _nodeId) = 0;
@@ -71,6 +72,7 @@ class RemoteManagerIf {
virtual bool IsValueReadOnly(const RemoteValueID& _id) = 0;
virtual bool IsValueWriteOnly(const RemoteValueID& _id) = 0;
virtual bool IsValueSet(const RemoteValueID& _id) = 0;
+ virtual bool IsValuePolled(const RemoteValueID& _id) = 0;
virtual void GetValueAsBool(Bool_Bool& _return, const RemoteValueID& _id) = 0;
virtual void GetValueAsByte(Bool_UInt8& _return, const RemoteValueID& _id) = 0;
virtual void GetValueAsFloat(Bool_Float& _return, const RemoteValueID& _id) = 0;
@@ -188,10 +190,10 @@ class RemoteManagerNull : virtual public RemoteManagerIf {
int32_t _return = 0;
return _return;
}
- void SetPollInterval(const int32_t /* _seconds */) {
+ void SetPollInterval(const int32_t /* _milliseconds */, const bool /* _bIntervalBetweenPolls */) {
return;
}
- bool EnablePoll(const RemoteValueID& /* _valueId */) {
+ bool EnablePoll(const RemoteValueID& /* _valueId */, const int8_t /* _intensity */) {
bool _return = false;
return _return;
}
@@ -203,6 +205,9 @@ class RemoteManagerNull : virtual public RemoteManagerIf {
bool _return = false;
return _return;
}
+ void SetPollIntensity(const RemoteValueID& /* _valueId */, const int8_t /* _intensity */) {
+ return;
+ }
bool RefreshNodeInfo(const int32_t /* _homeId */, const int8_t /* _nodeId */) {
bool _return = false;
return _return;
@@ -352,6 +357,10 @@ class RemoteManagerNull : virtual public RemoteManagerIf {
bool _return = false;
return _return;
}
+ bool IsValuePolled(const RemoteValueID& /* _id */) {
+ bool _return = false;
+ return _return;
+ }
void GetValueAsBool(Bool_Bool& /* _return */, const RemoteValueID& /* _id */) {
return;
}
@@ -1649,29 +1658,37 @@ class RemoteManager_GetPollInterval_presult {
};
typedef struct _RemoteManager_SetPollInterval_args__isset {
- _RemoteManager_SetPollInterval_args__isset() : _seconds(false) {}
- bool _seconds;
+ _RemoteManager_SetPollInterval_args__isset() : _milliseconds(false), _bIntervalBetweenPolls(false) {}
+ bool _milliseconds;
+ bool _bIntervalBetweenPolls;
} _RemoteManager_SetPollInterval_args__isset;
class RemoteManager_SetPollInterval_args {
public:
- RemoteManager_SetPollInterval_args() : _seconds(0) {
+ RemoteManager_SetPollInterval_args() : _milliseconds(0), _bIntervalBetweenPolls(0) {
}
virtual ~RemoteManager_SetPollInterval_args() throw() {}
- int32_t _seconds;
+ int32_t _milliseconds;
+ bool _bIntervalBetweenPolls;
_RemoteManager_SetPollInterval_args__isset __isset;
- void __set__seconds(const int32_t val) {
- _seconds = val;
+ void __set__milliseconds(const int32_t val) {
+ _milliseconds = val;
+ }
+
+ void __set__bIntervalBetweenPolls(const bool val) {
+ _bIntervalBetweenPolls = val;
}
bool operator == (const RemoteManager_SetPollInterval_args & rhs) const
{
- if (!(_seconds == rhs._seconds))
+ if (!(_milliseconds == rhs._milliseconds))
+ return false;
+ if (!(_bIntervalBetweenPolls == rhs._bIntervalBetweenPolls))
return false;
return true;
}
@@ -1693,7 +1710,8 @@ class RemoteManager_SetPollInterval_pargs {
virtual ~RemoteManager_SetPollInterval_pargs() throw() {}
- const int32_t* _seconds;
+ const int32_t* _milliseconds;
+ const bool* _bIntervalBetweenPolls;
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
@@ -1737,19 +1755,21 @@ class RemoteManager_SetPollInterval_presult {
};
typedef struct _RemoteManager_EnablePoll_args__isset {
- _RemoteManager_EnablePoll_args__isset() : _valueId(false) {}
+ _RemoteManager_EnablePoll_args__isset() : _valueId(false), _intensity(false) {}
bool _valueId;
+ bool _intensity;
} _RemoteManager_EnablePoll_args__isset;
class RemoteManager_EnablePoll_args {
public:
- RemoteManager_EnablePoll_args() {
+ RemoteManager_EnablePoll_args() : _intensity(1) {
}
virtual ~RemoteManager_EnablePoll_args() throw() {}
RemoteValueID _valueId;
+ int8_t _intensity;
_RemoteManager_EnablePoll_args__isset __isset;
@@ -1757,10 +1777,16 @@ class RemoteManager_EnablePoll_args {
_valueId = val;
}
+ void __set__intensity(const int8_t val) {
+ _intensity = val;
+ }
+
bool operator == (const RemoteManager_EnablePoll_args & rhs) const
{
if (!(_valueId == rhs._valueId))
return false;
+ if (!(_intensity == rhs._intensity))
+ return false;
return true;
}
bool operator != (const RemoteManager_EnablePoll_args &rhs) const {
@@ -1782,6 +1808,7 @@ class RemoteManager_EnablePoll_pargs {
virtual ~RemoteManager_EnablePoll_pargs() throw() {}
const RemoteValueID* _valueId;
+ const int8_t* _intensity;
uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
@@ -2060,6 +2087,103 @@ class RemoteManager_isPolled_presult {
};
+typedef struct _RemoteManager_SetPollIntensity_args__isset {
+ _RemoteManager_SetPollIntensity_args__isset() : _valueId(false), _intensity(false) {}
+ bool _valueId;
+ bool _intensity;
+} _RemoteManager_SetPollIntensity_args__isset;
+
+class RemoteManager_SetPollIntensity_args {
+ public:
+
+ RemoteManager_SetPollIntensity_args() : _intensity(0) {
+ }
+
+ virtual ~RemoteManager_SetPollIntensity_args() throw() {}
+
+ RemoteValueID _valueId;
+ int8_t _intensity;
+
+ _RemoteManager_SetPollIntensity_args__isset __isset;
+
+ void __set__valueId(const RemoteValueID& val) {
+ _valueId = val;
+ }
+
+ void __set__intensity(const int8_t val) {
+ _intensity = val;
+ }
+
+ bool operator == (const RemoteManager_SetPollIntensity_args & rhs) const
+ {
+ if (!(_valueId == rhs._valueId))
+ return false;
+ if (!(_intensity == rhs._intensity))
+ return false;
+ return true;
+ }
+ bool operator != (const RemoteManager_SetPollIntensity_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const RemoteManager_SetPollIntensity_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class RemoteManager_SetPollIntensity_pargs {
+ public:
+
+
+ virtual ~RemoteManager_SetPollIntensity_pargs() throw() {}
+
+ const RemoteValueID* _valueId;
+ const int8_t* _intensity;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class RemoteManager_SetPollIntensity_result {
+ public:
+
+ RemoteManager_SetPollIntensity_result() {
+ }
+
+ virtual ~RemoteManager_SetPollIntensity_result() throw() {}
+
+
+ bool operator == (const RemoteManager_SetPollIntensity_result & /* rhs */) const
+ {
+ return true;
+ }
+ bool operator != (const RemoteManager_SetPollIntensity_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const RemoteManager_SetPollIntensity_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class RemoteManager_SetPollIntensity_presult {
+ public:
+
+
+ virtual ~RemoteManager_SetPollIntensity_presult() throw() {}
+
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
typedef struct _RemoteManager_RefreshNodeInfo_args__isset {
_RemoteManager_RefreshNodeInfo_args__isset() : _homeId(false), _nodeId(false) {}
bool _homeId;
@@ -6873,6 +6997,114 @@ class RemoteManager_IsValueSet_presult {
};
+typedef struct _RemoteManager_IsValuePolled_args__isset {
+ _RemoteManager_IsValuePolled_args__isset() : _id(false) {}
+ bool _id;
+} _RemoteManager_IsValuePolled_args__isset;
+
+class RemoteManager_IsValuePolled_args {
+ public:
+
+ RemoteManager_IsValuePolled_args() {
+ }
+
+ virtual ~RemoteManager_IsValuePolled_args() throw() {}
+
+ RemoteValueID _id;
+
+ _RemoteManager_IsValuePolled_args__isset __isset;
+
+ void __set__id(const RemoteValueID& val) {
+ _id = val;
+ }
+
+ bool operator == (const RemoteManager_IsValuePolled_args & rhs) const
+ {
+ if (!(_id == rhs._id))
+ return false;
+ return true;
+ }
+ bool operator != (const RemoteManager_IsValuePolled_args &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const RemoteManager_IsValuePolled_args & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+
+class RemoteManager_IsValuePolled_pargs {
+ public:
+
+
+ virtual ~RemoteManager_IsValuePolled_pargs() throw() {}
+
+ const RemoteValueID* _id;
+
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _RemoteManager_IsValuePolled_result__isset {
+ _RemoteManager_IsValuePolled_result__isset() : success(false) {}
+ bool success;
+} _RemoteManager_IsValuePolled_result__isset;
+
+class RemoteManager_IsValuePolled_result {
+ public:
+
+ RemoteManager_IsValuePolled_result() : success(0) {
+ }
+
+ virtual ~RemoteManager_IsValuePolled_result() throw() {}
+
+ bool success;
+
+ _RemoteManager_IsValuePolled_result__isset __isset;
+
+ void __set_success(const bool val) {
+ success = val;
+ }
+
+ bool operator == (const RemoteManager_IsValuePolled_result & rhs) const
+ {
+ if (!(success == rhs.success))
+ return false;
+ return true;
+ }
+ bool operator != (const RemoteManager_IsValuePolled_result &rhs) const {
+ return !(*this == rhs);
+ }
+
+ bool operator < (const RemoteManager_IsValuePolled_result & ) const;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+ uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
+
+};
+
+typedef struct _RemoteManager_IsValuePolled_presult__isset {
+ _RemoteManager_IsValuePolled_presult__isset() : success(false) {}
+ bool success;
+} _RemoteManager_IsValuePolled_presult__isset;
+
+class RemoteManager_IsValuePolled_presult {
+ public:
+
+
+ virtual ~RemoteManager_IsValuePolled_presult() throw() {}
+
+ bool* success;
+
+ _RemoteManager_IsValuePolled_presult__isset __isset;
+
+ uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
+
+};
+
typedef struct _RemoteManager_GetValueAsBool_args__isset {
_RemoteManager_GetValueAsBool_args__isset() : _id(false) {}
bool _id;
@@ -15566,11 +15798,11 @@ class RemoteManagerClient : virtual public RemoteManagerIf {
int32_t GetPollInterval();
void send_GetPollInterval();
int32_t recv_GetPollInterval();
- void SetPollInterval(const int32_t _seconds);
- void send_SetPollInterval(const int32_t _seconds);
+ void SetPollInterval(const int32_t _milliseconds, const bool _bIntervalBetweenPolls);
+ void send_SetPollInterval(const int32_t _milliseconds, const bool _bIntervalBetweenPolls);
void recv_SetPollInterval();
- bool EnablePoll(const RemoteValueID& _valueId);
- void send_EnablePoll(const RemoteValueID& _valueId);
+ bool EnablePoll(const RemoteValueID& _valueId, const int8_t _intensity);
+ void send_EnablePoll(const RemoteValueID& _valueId, const int8_t _intensity);
bool recv_EnablePoll();
bool DisablePoll(const RemoteValueID& _valueId);
void send_DisablePoll(const RemoteValueID& _valueId);
@@ -15578,6 +15810,9 @@ class RemoteManagerClient : virtual public RemoteManagerIf {
bool isPolled(const RemoteValueID& _valueId);
void send_isPolled(const RemoteValueID& _valueId);
bool recv_isPolled();
+ void SetPollIntensity(const RemoteValueID& _valueId, const int8_t _intensity);
+ void send_SetPollIntensity(const RemoteValueID& _valueId, const int8_t _intensity);
+ void recv_SetPollIntensity();
bool RefreshNodeInfo(const int32_t _homeId, const int8_t _nodeId);
void send_RefreshNodeInfo(const int32_t _homeId, const int8_t _nodeId);
bool recv_RefreshNodeInfo();
@@ -15707,6 +15942,9 @@ class RemoteManagerClient : virtual public RemoteManagerIf {
bool IsValueSet(const RemoteValueID& _id);
void send_IsValueSet(const RemoteValueID& _id);
bool recv_IsValueSet();
+ bool IsValuePolled(const RemoteValueID& _id);
+ void send_IsValuePolled(const RemoteValueID& _id);
+ bool recv_IsValuePolled();
void GetValueAsBool(Bool_Bool& _return, const RemoteValueID& _id);
void send_GetValueAsBool(const RemoteValueID& _id);
void recv_GetValueAsBool(Bool_Bool& _return);
@@ -15962,6 +16200,7 @@ class RemoteManagerProcessor : virtual public ::apache::thrift::TProcessor {
void process_EnablePoll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_DisablePoll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_isPolled(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_SetPollIntensity(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_RefreshNodeInfo(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_RequestNodeState(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_RequestNodeDynamic(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -16005,6 +16244,7 @@ class RemoteManagerProcessor : virtual public ::apache::thrift::TProcessor {
void process_IsValueReadOnly(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_IsValueWriteOnly(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_IsValueSet(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
+ void process_IsValuePolled(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_GetValueAsBool(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_GetValueAsByte(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
void process_GetValueAsFloat(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext);
@@ -16098,6 +16338,7 @@ class RemoteManagerProcessor : virtual public ::apache::thrift::TProcessor {
processMap_["EnablePoll"] = &RemoteManagerProcessor::process_EnablePoll;
processMap_["DisablePoll"] = &RemoteManagerProcessor::process_DisablePoll;
processMap_["isPolled"] = &RemoteManagerProcessor::process_isPolled;
+ processMap_["SetPollIntensity"] = &RemoteManagerProcessor::process_SetPollIntensity;
processMap_["RefreshNodeInfo"] = &RemoteManagerProcessor::process_RefreshNodeInfo;
processMap_["RequestNodeState"] = &RemoteManagerProcessor::process_RequestNodeState;
processMap_["RequestNodeDynamic"] = &RemoteManagerProcessor::process_RequestNodeDynamic;
@@ -16141,6 +16382,7 @@ class RemoteManagerProcessor : virtual public ::apache::thrift::TProcessor {
processMap_["IsValueReadOnly"] = &RemoteManagerProcessor::process_IsValueReadOnly;
processMap_["IsValueWriteOnly"] = &RemoteManagerProcessor::process_IsValueWriteOnly;
processMap_["IsValueSet"] = &RemoteManagerProcessor::process_IsValueSet;
+ processMap_["IsValuePolled"] = &RemoteManagerProcessor::process_IsValuePolled;
processMap_["GetValueAsBool"] = &RemoteManagerProcessor::process_GetValueAsBool;
processMap_["GetValueAsByte"] = &RemoteManagerProcessor::process_GetValueAsByte;
processMap_["GetValueAsFloat"] = &RemoteManagerProcessor::process_GetValueAsFloat;
@@ -16339,20 +16581,20 @@ class RemoteManagerMultiface : virtual public RemoteManagerIf {
}
}
- void SetPollInterval(const int32_t _seconds) {
+ void SetPollInterval(const int32_t _milliseconds, const bool _bIntervalBetweenPolls) {
size_t sz = ifaces_.size();
for (size_t i = 0; i < sz; ++i) {
- ifaces_[i]->SetPollInterval(_seconds);
+ ifaces_[i]->SetPollInterval(_milliseconds, _bIntervalBetweenPolls);
}
}
- bool EnablePoll(const RemoteValueID& _valueId) {
+ bool EnablePoll(const RemoteValueID& _valueId, const int8_t _intensity) {
size_t sz = ifaces_.size();
for (size_t i = 0; i < sz; ++i) {
if (i == sz - 1) {
- return ifaces_[i]->EnablePoll(_valueId);
+ return ifaces_[i]->EnablePoll(_valueId, _intensity);
} else {
- ifaces_[i]->EnablePoll(_valueId);
+ ifaces_[i]->EnablePoll(_valueId, _intensity);
}
}
}
@@ -16379,6 +16621,13 @@ class RemoteManagerMultiface : virtual public RemoteManagerIf {
}
}
+ void SetPollIntensity(const RemoteValueID& _valueId, const int8_t _intensity) {
+ size_t sz = ifaces_.size();
+ for (size_t i = 0; i < sz; ++i) {
+ ifaces_[i]->SetPollIntensity(_valueId, _intensity);
+ }
+ }
+
bool RefreshNodeInfo(const int32_t _homeId, const int8_t _nodeId) {
size_t sz = ifaces_.size();
for (size_t i = 0; i < sz; ++i) {
@@ -16825,6 +17074,17 @@ class RemoteManagerMultiface : virtual public RemoteManagerIf {
}
}
+ bool IsValuePolled(const RemoteValueID& _id) {
+ size_t sz = ifaces_.size();
+ for (size_t i = 0; i < sz; ++i) {
+ if (i == sz - 1) {
+ return ifaces_[i]->IsValuePolled(_id);
+ } else {
+ ifaces_[i]->IsValuePolled(_id);
+ }
+ }
+ }
+
void GetValueAsBool(Bool_Bool& _return, const RemoteValueID& _id) {
size_t sz = ifaces_.size();
for (size_t i = 0; i < sz; ++i) {
View
23 gen-cpp/RemoteManager_server.cpp
@@ -109,17 +109,17 @@ class RemoteManagerHandler : virtual public RemoteManagerIf {
return(function_result);
}
- void SetPollInterval(const int32_t _seconds) {
+ void SetPollInterval(const int32_t _milliseconds, const bool _bIntervalBetweenPolls) {
Manager* mgr = Manager::Get();
g_criticalSection.lock();
- mgr->SetPollInterval((::int32) _seconds);
+ mgr->SetPollInterval((::int32) _milliseconds, (bool) _bIntervalBetweenPolls);
g_criticalSection.unlock();
}
- bool EnablePoll(const RemoteValueID& _valueId) {
+ bool EnablePoll(const RemoteValueID& _valueId, const int8_t _intensity) {
Manager* mgr = Manager::Get();
g_criticalSection.lock();
- bool function_result = mgr->EnablePoll(_valueId.toValueID());
+ bool function_result = mgr->EnablePoll(_valueId.toValueID(), (::uint8 const) _intensity);
g_criticalSection.unlock();
return(function_result);
}
@@ -140,6 +140,13 @@ class RemoteManagerHandler : virtual public RemoteManagerIf {
return(function_result);
}
+ void SetPollIntensity(const RemoteValueID& _valueId, const int8_t _intensity) {
+ Manager* mgr = Manager::Get();
+ g_criticalSection.lock();
+ mgr->SetPollIntensity(_valueId.toValueID(), (::uint8 const) _intensity);
+ g_criticalSection.unlock();
+ }
+
bool RefreshNodeInfo(const int32_t _homeId, const int8_t _nodeId) {
Manager* mgr = Manager::Get();
g_criticalSection.lock();
@@ -466,6 +473,14 @@ class RemoteManagerHandler : virtual public RemoteManagerIf {
return(function_result);
}
+ bool IsValuePolled(const RemoteValueID& _id) {
+ Manager* mgr = Manager::Get();
+ g_criticalSection.lock();
+ bool function_result = mgr->IsValuePolled(_id.toValueID());
+ g_criticalSection.unlock();
+ return(function_result);
+ }
+
void GetValueAsBool(Bool_Bool& _return, const RemoteValueID& _id) {
Manager* mgr = Manager::Get();
g_criticalSection.lock();
View
14 gen-cpp/RemoteManager_server.skeleton.cpp
@@ -72,12 +72,12 @@ class RemoteManagerHandler : virtual public RemoteManagerIf {
printf("GetPollInterval\n");
}
- void SetPollInterval(const int32_t _seconds) {
+ void SetPollInterval(const int32_t _milliseconds, const bool _bIntervalBetweenPolls) {
// Your implementation goes here
printf("SetPollInterval\n");
}
- bool EnablePoll(const RemoteValueID& _valueId) {
+ bool EnablePoll(const RemoteValueID& _valueId, const int8_t _intensity) {
// Your implementation goes here
printf("EnablePoll\n");
}
@@ -92,6 +92,11 @@ class RemoteManagerHandler : virtual public RemoteManagerIf {
printf("isPolled\n");
}
+ void SetPollIntensity(const RemoteValueID& _valueId, const int8_t _intensity) {
+ // Your implementation goes here
+ printf("SetPollIntensity\n");
+ }
+
bool RefreshNodeInfo(const int32_t _homeId, const int8_t _nodeId) {
// Your implementation goes here
printf("RefreshNodeInfo\n");
@@ -307,6 +312,11 @@ class RemoteManagerHandler : virtual public RemoteManagerIf {
printf("IsValueSet\n");
}
+ bool IsValuePolled(const RemoteValueID& _id) {
+ // Your implementation goes here
+ printf("IsValuePolled\n");
+ }
+
void GetValueAsBool(Bool_Bool& _return, const RemoteValueID& _id) {
// Your implementation goes here
printf("GetValueAsBool\n");
View
536 gen-csharp/OpenZWave/RemoteManager.cs
@@ -26,10 +26,11 @@ public interface Iface {
int GetSendQueueCount(int _homeId);
void LogDriverStatistics(int _homeId);
int GetPollInterval();
- void SetPollInterval(int _seconds);
- bool EnablePoll(RemoteValueID _valueId);
+ void SetPollInterval(int _milliseconds, bool _bIntervalBetweenPolls);
+ bool EnablePoll(RemoteValueID _valueId, byte _intensity);
bool DisablePoll(RemoteValueID _valueId);
bool isPolled(RemoteValueID _valueId);
+ void SetPollIntensity(RemoteValueID _valueId, byte _intensity);
bool RefreshNodeInfo(int _homeId, byte _nodeId);
bool RequestNodeState(int _homeId, byte _nodeId);
bool RequestNodeDynamic(int _homeId, byte _nodeId);
@@ -73,6 +74,7 @@ public interface Iface {
bool IsValueReadOnly(RemoteValueID _id);
bool IsValueWriteOnly(RemoteValueID _id);
bool IsValueSet(RemoteValueID _id);
+ bool IsValuePolled(RemoteValueID _id);
Bool_Bool GetValueAsBool(RemoteValueID _id);
Bool_UInt8 GetValueAsByte(RemoteValueID _id);
Bool_Float GetValueAsFloat(RemoteValueID _id);
@@ -499,17 +501,18 @@ public int recv_GetPollInterval()
throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "GetPollInterval failed: unknown result");
}
- public void SetPollInterval(int _seconds)
+ public void SetPollInterval(int _milliseconds, bool _bIntervalBetweenPolls)
{
- send_SetPollInterval(_seconds);
+ send_SetPollInterval(_milliseconds, _bIntervalBetweenPolls);
recv_SetPollInterval();
}
- public void send_SetPollInterval(int _seconds)
+ public void send_SetPollInterval(int _milliseconds, bool _bIntervalBetweenPolls)
{
oprot_.WriteMessageBegin(new TMessage("SetPollInterval", TMessageType.Call, seqid_));
SetPollInterval_args args = new SetPollInterval_args();
- args._seconds = _seconds;
+ args._milliseconds = _milliseconds;
+ args._bIntervalBetweenPolls = _bIntervalBetweenPolls;
args.Write(oprot_);
oprot_.WriteMessageEnd();
oprot_.Transport.Flush();
@@ -529,17 +532,18 @@ public void recv_SetPollInterval()
return;
}
- public bool EnablePoll(RemoteValueID _valueId)
+ public bool EnablePoll(RemoteValueID _valueId, byte _intensity)
{
- send_EnablePoll(_valueId);
+ send_EnablePoll(_valueId, _intensity);
return recv_EnablePoll();
}
- public void send_EnablePoll(RemoteValueID _valueId)
+ public void send_EnablePoll(RemoteValueID _valueId, byte _intensity)
{
oprot_.WriteMessageBegin(new TMessage("EnablePoll", TMessageType.Call, seqid_));
EnablePoll_args args = new EnablePoll_args();
args._valueId = _valueId;
+ args._intensity = _intensity;
args.Write(oprot_);
oprot_.WriteMessageEnd();
oprot_.Transport.Flush();
@@ -628,6 +632,37 @@ public bool recv_isPolled()
throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "isPolled failed: unknown result");
}
+ public void SetPollIntensity(RemoteValueID _valueId, byte _intensity)
+ {
+ send_SetPollIntensity(_valueId, _intensity);
+ recv_SetPollIntensity();
+ }
+
+ public void send_SetPollIntensity(RemoteValueID _valueId, byte _intensity)
+ {
+ oprot_.WriteMessageBegin(new TMessage("SetPollIntensity", TMessageType.Call, seqid_));
+ SetPollIntensity_args args = new SetPollIntensity_args();
+ args._valueId = _valueId;
+ args._intensity = _intensity;
+ args.Write(oprot_);
+ oprot_.WriteMessageEnd();
+ oprot_.Transport.Flush();
+ }
+
+ public void recv_SetPollIntensity()
+ {
+ TMessage msg = iprot_.ReadMessageBegin();
+ if (msg.Type == TMessageType.Exception) {
+ TApplicationException x = TApplicationException.Read(iprot_);
+ iprot_.ReadMessageEnd();
+ throw x;
+ }
+ SetPollIntensity_result result = new SetPollIntensity_result();
+ result.Read(iprot_);
+ iprot_.ReadMessageEnd();
+ return;
+ }
+
public bool RefreshNodeInfo(int _homeId, byte _nodeId)
{
send_RefreshNodeInfo(_homeId, _nodeId);
@@ -2058,6 +2093,39 @@ public bool recv_IsValueSet()
throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "IsValueSet failed: unknown result");
}
+ public bool IsValuePolled(RemoteValueID _id)
+ {
+ send_IsValuePolled(_id);
+ return recv_IsValuePolled();
+ }
+
+ public void send_IsValuePolled(RemoteValueID _id)
+ {
+ oprot_.WriteMessageBegin(new TMessage("IsValuePolled", TMessageType.Call, seqid_));
+ IsValuePolled_args args = new IsValuePolled_args();
+ args._id = _id;
+ args.Write(oprot_);
+ oprot_.WriteMessageEnd();
+ oprot_.Transport.Flush();
+ }
+
+ public bool recv_IsValuePolled()
+ {
+ TMessage msg = iprot_.ReadMessageBegin();
+ if (msg.Type == TMessageType.Exception) {
+ TApplicationException x = TApplicationException.Read(iprot_);
+ iprot_.ReadMessageEnd();
+ throw x;
+ }
+ IsValuePolled_result result = new IsValuePolled_result();
+ result.Read(iprot_);
+ iprot_.ReadMessageEnd();
+ if (result.__isset.success) {
+ return result.Success;
+ }
+ throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "IsValuePolled failed: unknown result");
+ }
+
public Bool_Bool GetValueAsBool(RemoteValueID _id)
{
send_GetValueAsBool(_id);
@@ -4627,6 +4695,7 @@ public Processor(Iface iface)
processMap_["EnablePoll"] = EnablePoll_Process;
processMap_["DisablePoll"] = DisablePoll_Process;
processMap_["isPolled"] = isPolled_Process;
+ processMap_["SetPollIntensity"] = SetPollIntensity_Process;
processMap_["RefreshNodeInfo"] = RefreshNodeInfo_Process;
processMap_["RequestNodeState"] = RequestNodeState_Process;
processMap_["RequestNodeDynamic"] = RequestNodeDynamic_Process;
@@ -4670,6 +4739,7 @@ public Processor(Iface iface)
processMap_["IsValueReadOnly"] = IsValueReadOnly_Process;
processMap_["IsValueWriteOnly"] = IsValueWriteOnly_Process;
processMap_["IsValueSet"] = IsValueSet_Process;
+ processMap_["IsValuePolled"] = IsValuePolled_Process;
processMap_["GetValueAsBool"] = GetValueAsBool_Process;
processMap_["GetValueAsByte"] = GetValueAsByte_Process;
processMap_["GetValueAsFloat"] = GetValueAsFloat_Process;
@@ -4914,7 +4984,7 @@ public void SetPollInterval_Process(int seqid, TProtocol iprot, TProtocol oprot)
args.Read(iprot);
iprot.ReadMessageEnd();
SetPollInterval_result result = new SetPollInterval_result();
- iface_.SetPollInterval(args._seconds);
+ iface_.SetPollInterval(args._milliseconds, args._bIntervalBetweenPolls);
oprot.WriteMessageBegin(new TMessage("SetPollInterval", TMessageType.Reply, seqid));
result.Write(oprot);
oprot.WriteMessageEnd();
@@ -4927,7 +4997,7 @@ public void EnablePoll_Process(int seqid, TProtocol iprot, TProtocol oprot)
args.Read(iprot);
iprot.ReadMessageEnd();
EnablePoll_result result = new EnablePoll_result();
- result.Success = iface_.EnablePoll(args._valueId);
+ result.Success = iface_.EnablePoll(args._valueId, args._intensity);
oprot.WriteMessageBegin(new TMessage("EnablePoll", TMessageType.Reply, seqid));
result.Write(oprot);
oprot.WriteMessageEnd();
@@ -4960,6 +5030,19 @@ public void isPolled_Process(int seqid, TProtocol iprot, TProtocol oprot)
oprot.Transport.Flush();
}
+ public void SetPollIntensity_Process(int seqid, TProtocol iprot, TProtocol oprot)
+ {
+ SetPollIntensity_args args = new SetPollIntensity_args();
+ args.Read(iprot);
+ iprot.ReadMessageEnd();
+ SetPollIntensity_result result = new SetPollIntensity_result();
+ iface_.SetPollIntensity(args._valueId, args._intensity);
+ oprot.WriteMessageBegin(new TMessage("SetPollIntensity", TMessageType.Reply, seqid));
+ result.Write(oprot);
+ oprot.WriteMessageEnd();
+ oprot.Transport.Flush();
+ }
+
public void RefreshNodeInfo_Process(int seqid, TProtocol iprot, TProtocol oprot)
{
RefreshNodeInfo_args args = new RefreshNodeInfo_args();
@@ -5519,6 +5602,19 @@ public void IsValueSet_Process(int seqid, TProtocol iprot, TProtocol oprot)
oprot.Transport.Flush();
}
+ public void IsValuePolled_Process(int seqid, TProtocol iprot, TProtocol oprot)
+ {
+ IsValuePolled_args args = new IsValuePolled_args();
+ args.Read(iprot);
+ iprot.ReadMessageEnd();
+ IsValuePolled_result result = new IsValuePolled_result();
+ result.Success = iface_.IsValuePolled(args._id);
+ oprot.WriteMessageBegin(new TMessage("IsValuePolled", TMessageType.Reply, seqid));
+ result.Write(oprot);
+ oprot.WriteMessageEnd();
+ oprot.Transport.Flush();
+ }
+
public void GetValueAsBool_Process(int seqid, TProtocol iprot, TProtocol oprot)
{
GetValueAsBool_args args = new GetValueAsBool_args();
@@ -8070,18 +8166,32 @@ public void Read (TProtocol iprot)
[Serializable]
public partial class SetPollInterval_args : TBase
{
- private int __seconds;
+ private int __milliseconds;
+ private bool __bIntervalBetweenPolls;
- public int _seconds
+ public int _milliseconds
{
get
{
- return __seconds;
+ return __milliseconds;
}
set
{
- __isset._seconds = true;
- this.__seconds = value;
+ __isset._milliseconds = true;
+ this.__milliseconds = value;
+ }
+ }
+
+ public bool _bIntervalBetweenPolls
+ {
+ get
+ {
+ return __bIntervalBetweenPolls;
+ }
+ set
+ {
+ __isset._bIntervalBetweenPolls = true;
+ this.__bIntervalBetweenPolls = value;
}
}
@@ -8089,7 +8199,8 @@ public int _seconds
public Isset __isset;
[Serializable]
public struct Isset {
- public bool _seconds;
+ public bool _milliseconds;
+ public bool _bIntervalBetweenPolls;
}
public SetPollInterval_args() {
@@ -8109,7 +8220,14 @@ public void Read (TProtocol iprot)
{
case 1:
if (field.Type == TType.I32) {
- _seconds = iprot.ReadI32();
+ _milliseconds = iprot.ReadI32();
+ } else {
+ TProtocolUtil.Skip(iprot, field.Type);
+ }
+ break;
+ case 2:
+ if (field.Type == TType.Bool) {
+ _bIntervalBetweenPolls = iprot.ReadBool();
} else {
TProtocolUtil.Skip(iprot, field.Type);
}
@@ -8127,12 +8245,20 @@ public void Read (TProtocol iprot)
TStruct struc = new TStruct("SetPollInterval_args");
oprot.WriteStructBegin(struc);
TField field = new TField();
- if (__isset._seconds) {
- field.Name = "_seconds";
+ if (__isset._milliseconds) {
+ field.Name = "_milliseconds";
field.Type = TType.I32;
field.ID = 1;
oprot.WriteFieldBegin(field);
- oprot.WriteI32(_seconds);
+ oprot.WriteI32(_milliseconds);
+ oprot.WriteFieldEnd();
+ }
+ if (__isset._bIntervalBetweenPolls) {
+ field.Name = "_bIntervalBetweenPolls";
+ field.Type = TType.Bool;
+ field.ID = 2;
+ oprot.WriteFieldBegin(field);
+ oprot.WriteBool(_bIntervalBetweenPolls);
oprot.WriteFieldEnd();
}
oprot.WriteFieldStop();
@@ -8141,8 +8267,10 @@ public void Read (TProtocol iprot)
public override string ToString() {
StringBuilder sb = new StringBuilder("SetPollInterval_args(");
- sb.Append("_seconds: ");
- sb.Append(_seconds);
+ sb.Append("_milliseconds: ");
+ sb.Append(_milliseconds);
+ sb.Append(",_bIntervalBetweenPolls: ");
+ sb.Append(_bIntervalBetweenPolls);
sb.Append(")");
return sb.ToString();
}
@@ -8199,6 +8327,7 @@ public void Read (TProtocol iprot)
public partial class EnablePoll_args : TBase
{
private RemoteValueID __valueId;
+ private byte __intensity;
public RemoteValueID _valueId
{
@@ -8213,14 +8342,29 @@ public RemoteValueID _valueId
}
}
+ public byte _intensity
+ {
+ get
+ {
+ return __intensity;
+ }
+ set
+ {
+ __isset._intensity = true;
+ this.__intensity = value;
+ }
+ }
+
public Isset __isset;
[Serializable]
public struct Isset {
public bool _valueId;
+ public bool _intensity;
}
public EnablePoll_args() {
+ this.__intensity = 1;
}
public void Read (TProtocol iprot)
@@ -8243,6 +8387,13 @@ public void Read (TProtocol iprot)
TProtocolUtil.Skip(iprot, field.Type);
}
break;
+ case 2:
+ if (field.Type == TType.Byte) {
+ _intensity = iprot.ReadByte();
+ } else {
+ TProtocolUtil.Skip(iprot, field.Type);
+ }
+ break;
default:
TProtocolUtil.Skip(iprot, field.Type);
break;
@@ -8264,6 +8415,14 @@ public void Read (TProtocol iprot)
_valueId.Write(oprot);
oprot.WriteFieldEnd();
}
+ if (__isset._intensity) {
+ field.Name = "_intensity";
+ field.Type = TType.Byte;
+ field.ID = 2;
+ oprot.WriteFieldBegin(field);
+ oprot.WriteByte(_intensity);
+ oprot.WriteFieldEnd();
+ }
oprot.WriteFieldStop();
oprot.WriteStructEnd();
}
@@ -8272,6 +8431,8 @@ public void Read (TProtocol iprot)
StringBuilder sb = new StringBuilder("EnablePoll_args(");
sb.Append("_valueId: ");
sb.Append(_valueId== null ? "<null>" : _valueId.ToString());
+ sb.Append(",_intensity: ");
+ sb.Append(_intensity);
sb.Append(")");
return sb.ToString();
}
@@ -8700,6 +8861,167 @@ public void Read (TProtocol iprot)
[Serializable]
+ public partial class SetPollIntensity_args : TBase
+ {
+ private RemoteValueID __valueId;
+ private byte __intensity;
+
+ public RemoteValueID _valueId
+ {
+ get
+ {
+ return __valueId;
+ }
+ set
+ {
+ __isset._valueId = true;
+ this.__valueId = value;
+ }
+ }
+
+ public byte _intensity
+ {
+ get
+ {
+ return __intensity;
+ }
+ set
+ {
+ __isset._intensity = true;
+ this.__intensity = value;
+ }
+ }
+
+
+ public Isset __isset;
+ [Serializable]
+ public struct Isset {
+ public bool _valueId;
+ public bool _intensity;
+ }
+
+ public SetPollIntensity_args() {
+ }
+
+ public void Read (TProtocol iprot)
+ {
+ TField field;
+ iprot.ReadStructBegin();
+ while (true)
+ {
+ field = iprot.ReadFieldBegin();
+ if (field.Type == TType.Stop) {
+ break;
+ }
+ switch (field.ID)
+ {
+ case 1:
+ if (field.Type == TType.Struct) {
+ _valueId = new RemoteValueID();
+ _valueId.Read(iprot);
+ } else {
+ TProtocolUtil.Skip(iprot, field.Type);
+ }
+ break;
+ case 2:
+ if (field.Type == TType.Byte) {
+ _intensity = iprot.ReadByte();
+ } else {
+ TProtocolUtil.Skip(iprot, field.Type);
+ }
+ break;
+ default:
+ TProtocolUtil.Skip(iprot, field.Type);
+ break;
+ }
+ iprot.ReadFieldEnd();
+ }
+ iprot.ReadStructEnd();
+ }
+
+ public void Write(TProtocol oprot) {
+ TStruct struc = new TStruct("SetPollIntensity_args");
+ oprot.WriteStructBegin(struc);
+ TField field = new TField();
+ if (_valueId != null && __isset._valueId) {
+ field.Name = "_valueId";
+ field.Type = TType.Struct;
+ field.ID = 1;
+ oprot.WriteFieldBegin(field);
+ _valueId.Write(oprot);
+ oprot.WriteFieldEnd();
+ }
+ if (__isset._intensity) {
+ field.Name = "_intensity";
+ field.Type = TType.Byte;
+ field.ID = 2;
+ oprot.WriteFieldBegin(field);
+ oprot.WriteByte(_intensity);
+ oprot.WriteFieldEnd();
+ }
+ oprot.WriteFieldStop();
+ oprot.WriteStructEnd();
+ }
+
+ public override string ToString() {
+ StringBuilder sb = new StringBuilder("SetPollIntensity_args(");
+ sb.Append("_valueId: ");
+ sb.Append(_valueId== null ? "<null>" : _valueId.ToString());
+ sb.Append(",_intensity: ");
+ sb.Append(_intensity);
+ sb.Append(")");
+ return sb.ToString();
+ }
+
+ }
+
+
+ [Serializable]
+ public partial class SetPollIntensity_result : TBase
+ {
+
+ public SetPollIntensity_result() {
+ }
+
+ public void Read (TProtocol iprot)
+ {
+ TField field;
+ iprot.ReadStructBegin();
+ while (true)
+ {
+ field = iprot.ReadFieldBegin();
+ if (field.Type == TType.Stop) {
+ break;
+ }
+ switch (field.ID)
+ {
+ default:
+ TProtocolUtil.Skip(iprot, field.Type);
+ break;
+ }
+ iprot.ReadFieldEnd();
+ }
+ iprot.ReadStructEnd();
+ }
+
+ public void Write(TProtocol oprot) {
+ TStruct struc = new TStruct("SetPollIntensity_result");
+ oprot.WriteStructBegin(struc);
+
+ oprot.WriteFieldStop();
+ oprot.WriteStructEnd();
+ }
+
+ public override string ToString() {
+ StringBuilder sb = new StringBuilder("SetPollIntensity_result(");
+ sb.Append(")");
+ return sb.ToString();
+ }
+
+ }
+
+
+ [Serializable]
public partial class RefreshNodeInfo_args : TBase
{
private int __homeId;
@@ -16842,6 +17164,174 @@ public void Read (TProtocol iprot)
[Serializable]
+ public partial class IsValuePolled_args : TBase
+ {
+ private RemoteValueID __id;
+
+ public RemoteValueID _id
+ {
+ get
+ {
+ return __id;
+ }
+ set
+ {
+ __isset._id = true;
+ this.__id = value;
+ }
+ }
+
+
+ public Isset __isset;
+ [Serializable]
+ public struct Isset {
+ public bool _id;
+ }
+
+ public IsValuePolled_args() {
+ }
+
+ public void Read (TProtocol iprot)
+ {
+ TField field;
+ iprot.ReadStructBegin();
+ while (true)
+ {
+ field = iprot.ReadFieldBegin();
+ if (field.Type == TType.Stop) {
+ break;
+ }
+ switch (field.ID)
+ {
+ case 1:
+ if (field.Type == TType.Struct) {
+ _id = new RemoteValueID();
+ _id.Read(iprot);
+ } else {
+ TProtocolUtil.Skip(iprot, field.Type);
+ }
+ break;
+ default:
+ TProtocolUtil.Skip(iprot, field.Type);
+ break;
+ }
+ iprot.ReadFieldEnd();
+ }
+ iprot.ReadStructEnd();
+ }
+
+ public void Write(TProtocol oprot) {
+ TStruct struc = new TStruct("IsValuePolled_args");
+ oprot.WriteStructBegin(struc);
+ TField field = new TField();
+ if (_id != null && __isset._id) {
+ field.Name = "_id";
+ field.Type = TType.Struct;
+ field.ID = 1;
+ oprot.WriteFieldBegin(field);
+ _id.Write(oprot);
+ oprot.WriteFieldEnd();
+ }
+ oprot.WriteFieldStop();
+ oprot.WriteStructEnd();
+ }
+
+ public override string ToString() {
+ StringBuilder sb = new StringBuilder("IsValuePolled_args(");
+ sb.Append("_id: ");
+ sb.Append(_id== null ? "<null>" : _id.ToString());
+ sb.Append(")");
+ return sb.ToString();
+ }
+
+ }
+
+
+ [Serializable]
+ public partial class IsValuePolled_result : TBase
+ {
+ private bool _success;
+
+ public bool Success
+ {
+ get
+ {
+ return _success;
+ }
+ set
+ {
+ __isset.success = true;
+ this._success = value;
+ }
+ }
+
+
+ public Isset __isset;
+ [Serializable]
+ public struct Isset {
+ public bool success;
+ }
+
+ public IsValuePolled_result() {
+ }
+
+ public void Read (TProtocol iprot)
+ {
+ TField field;
+ iprot.ReadStructBegin();
+ while (true)
+ {
+ field = iprot.ReadFieldBegin();
+ if (field.Type == TType.Stop) {
+ break;
+ }
+ switch (field.ID)
+ {
+ case 0:
+ if (field.Type == TType.Bool) {
+ Success = iprot.ReadBool();
+ } else {
+ TProtocolUtil.Skip(iprot, field.Type);
+ }
+ break;
+ default:
+ TProtocolUtil.Skip(iprot, field.Type);
+ break;
+ }
+ iprot.ReadFieldEnd();
+ }
+ iprot.ReadStructEnd();
+ }
+
+ public void Write(TProtocol oprot) {
+ TStruct struc = new TStruct("IsValuePolled_result");
+ oprot.WriteStructBegin(struc);
+ TField field = new TField();
+
+ if (this.__isset.success) {
+ field.Name = "Success";
+ field.Type = TType.Bool;
+ field.ID = 0;
+ oprot.WriteFieldBegin(field);
+ oprot.WriteBool(Success);
+ oprot.WriteFieldEnd();
+ }
+ oprot.WriteFieldStop();
+ oprot.WriteStructEnd();
+ }
+
+ public override string ToString() {
+ StringBuilder sb = new StringBuilder("IsValuePolled_result(");
+ sb.Append("Success: ");
+ sb.Append(Success);
+ sb.Append(")");
+ return sb.ToString();
+ }
+
+ }
+
+
+ [Serializable]
public partial class GetValueAsBool_args : TBase
{
private RemoteValueID __id;
View
26 gen-erl/remoteManager_thrift.erl
@@ -104,18 +104,18 @@ function_info('GetPollInterval', reply_type) ->
function_info('GetPollInterval', exceptions) ->
{struct, []}
;
-% SetPollInterval(This, _seconds)
+% SetPollInterval(This, _milliseconds, _bIntervalBetweenPolls)
function_info('SetPollInterval', params_type) ->
- {struct, [{1, i32}]}
+ {struct, [{1, i32}, {2, bool}]}
;
function_info('SetPollInterval', reply_type) ->
{struct, []};
function_info('SetPollInterval', exceptions) ->
{struct, []}
;
-% EnablePoll(This, _valueId)
+% EnablePoll(This, _valueId, _intensity)
function_info('EnablePoll', params_type) ->
- {struct, [{1, {struct, {'ozw_types', 'remoteValueID'}}}]}
+ {struct, [{1, {struct, {'ozw_types', 'remoteValueID'}}}, {2, byte}]}
;
function_info('EnablePoll', reply_type) ->
bool;
@@ -140,6 +140,15 @@ function_info('isPolled', reply_type) ->
function_info('isPolled', exceptions) ->
{struct, []}
;
+% SetPollIntensity(This, _valueId, _intensity)
+function_info('SetPollIntensity', params_type) ->
+ {struct, [{1, {struct, {'ozw_types', 'remoteValueID'}}}, {2, byte}]}
+;
+function_info('SetPollIntensity', reply_type) ->
+ {struct, []};
+function_info('SetPollIntensity', exceptions) ->
+ {struct, []}
+;
% RefreshNodeInfo(This, _homeId, _nodeId)
function_info('RefreshNodeInfo', params_type) ->
{struct, [{1, i32}, {2, byte}]}
@@ -527,6 +536,15 @@ function_info('IsValueSet', reply_type) ->
function_info('IsValueSet', exceptions) ->
{struct, []}
;
+% IsValuePolled(This, _id)
+function_info('IsValuePolled', params_type) ->
+ {struct, [{1, {struct, {'ozw_types', 'remoteValueID'}}}]}
+;
+function_info('IsValuePolled', reply_type) ->
+ bool;
+function_info('IsValuePolled', exceptions) ->
+ {struct, []}
+;
% GetValueAsBool(This, _id)
function_info('GetValueAsBool', params_type) ->
{struct, [{1, {struct, {'ozw_types', 'remoteValueID'}}}]}
View
6,412 gen-go/OpenZWave/RemoteManager.go
3,650 additions, 2,762 deletions not shown
View
2,112 gen-go/OpenZWave/RemoteManager/RemoteManager-remote.go
1,090 additions, 1,022 deletions not shown
View
7,003 gen-java/OpenZWave/RemoteManager.java
4,261 additions, 2,742 deletions not shown
View
332 gen-js/RemoteManager.js
@@ -993,10 +993,14 @@ OpenZWave.RemoteManager_GetPollInterval_result.prototype.write = function(output
};
OpenZWave.RemoteManager_SetPollInterval_args = function(args) {
- this._seconds = null;
+ this._milliseconds = null;
+ this._bIntervalBetweenPolls = null;
if (args) {
- if (args._seconds !== undefined) {
- this._seconds = args._seconds;
+ if (args._milliseconds !== undefined) {
+ this._milliseconds = args._milliseconds;
+ }
+ if (args._bIntervalBetweenPolls !== undefined) {
+ this._bIntervalBetweenPolls = args._bIntervalBetweenPolls;
}
}
};
@@ -1016,14 +1020,18 @@ OpenZWave.RemoteManager_SetPollInterval_args.prototype.read = function(input) {
{
case 1:
if (ftype == Thrift.Type.I32) {
- this._seconds = input.readI32().value;
+ this._milliseconds = input.readI32().value;
} else {
input.skip(ftype);
}
break;
- case 0:
+ case 2:
+ if (ftype == Thrift.Type.BOOL) {
+ this._bIntervalBetweenPolls = input.readBool().value;
+ } else {
input.skip(ftype);
- break;
+ }
+ break;
default:
input.skip(ftype);
}
@@ -1035,9 +1043,14 @@ OpenZWave.RemoteManager_SetPollInterval_args.prototype.read = function(input) {
OpenZWave.RemoteManager_SetPollInterval_args.prototype.write = function(output) {
output.writeStructBegin('RemoteManager_SetPollInterval_args');
- if (this._seconds) {
- output.writeFieldBegin('_seconds', Thrift.Type.I32, 1);
- output.writeI32(this._seconds);
+ if (this._milliseconds) {
+ output.writeFieldBegin('_milliseconds', Thrift.Type.I32, 1);
+ output.writeI32(this._milliseconds);
+ output.writeFieldEnd();
+ }
+ if (this._bIntervalBetweenPolls) {
+ output.writeFieldBegin('_bIntervalBetweenPolls', Thrift.Type.BOOL, 2);
+ output.writeBool(this._bIntervalBetweenPolls);
output.writeFieldEnd();
}
output.writeFieldStop();
@@ -1075,10 +1088,14 @@ OpenZWave.RemoteManager_SetPollInterval_result.prototype.write = function(output
OpenZWave.RemoteManager_EnablePoll_args = function(args) {
this._valueId = null;
+ this._intensity = 1;
if (args) {
if (args._valueId !== undefined) {
this._valueId = args._valueId;