macchina-io / macchina.io

macchina.io EDGE is a powerful C++ and JavaScript SDK for edge devices, multi-service IoT gateways and connected embedded systems.
https://macchina.io
GNU General Public License v3.0
512 stars 152 forks source link

remoteNG question #112

Open wzc81614 opened 2 years ago

wzc81614 commented 2 years ago

Expected Behavior

printf current Time

Actual Behavior

Remote Exception: Method not found: currentTime

Steps to Reproduce

modify RemotingNG samples TimeServerTCP.h

ifndef TimeService_INCLUDED

define TimeService_INCLUDED

include "Poco/Foundation.h"

include "Poco/BasicEvent.h"

include "Poco/DateTime.h"

include "Poco/Util/Timer.h"

namespace Services {

//@ remote class PublicTime { public: virtual Poco::DateTime currentTime() const = 0;

virtual ~PublicTime() { }

}; //@ remote class TimeService : public PublicTime { public: TimeService(); /// Creates the TimeService.

~TimeService();
    /// Destroys the TimeService.

Poco::BasicEvent<const std::string> wakeUp;

Poco::DateTime currentTime() const;
    /// Returns the current date and time.

void wakeMeUp(const Poco::DateTime& time, const std::string& message);
    /// Schedules a wakeup call.
    ///
    /// Fires the wakeUp event at the given time, passing
    /// the given message as argument.

private: Poco::Util::Timer _timer; };

} // namespace Services

endif // TimeService_INCLUDED

question

RemoteGen can not use like this? @obiltschnig

wzc81614 commented 2 years ago

@obiltschnig Could you give me some udpate?Thanks.