File Information
Library: IoT/Devices
Package: Generated
Header: IoT/Devices/IGNSSSensor.h
Description
The interface for GNSS/GPS receivers.
Implementations of this class should also support the following (optional) properties for configuration:
- positionChangedPeriod (int): the minimum time interval in milliseconds between firings of the positionUpdate event.
- positionChangedDelta (int): the minimum distance (in meters) the receiver must move before the positionUpdate event is fired again.
- positionTimeout (int): Timeout in milliseconds after which the positionLost event is fired if no valid position has been received from the GNSS receiver.
Inheritance
Direct Base Classes: IDevice
All Base Classes: IDevice, Poco::OSP::Service, Poco::RefCountedObject
Known Derived Classes: GNSSSensorRemoteObject
Member Summary
Member Functions: altitude, course, hdop, isA, magneticVariation, position, positionAvailable, remoting__enableEvents, remoting__typeId, speed, type
Inherited Functions: duplicate, getFeature, getPropertyBool, getPropertyDouble, getPropertyInt, getPropertyInt16, getPropertyInt64, getPropertyString, getPropertyTimestamp, hasFeature, hasProperty, isA, referenceCount, release, remoting__enableEvents, remoting__typeId, setFeature, setPropertyBool, setPropertyDouble, setPropertyInt, setPropertyInt16, setPropertyInt64, setPropertyString, setPropertyTimestamp, type
Types Aliases
Ptr
using Ptr = Poco::AutoPtr < IGNSSSensor >;
Constructors
IGNSSSensor
IGNSSSensor();
Creates a IGNSSSensor.
Destructor
~IGNSSSensor
virtual ~IGNSSSensor();
Destroys the IGNSSSensor.
Member Functions
altitude
virtual double altitude() const = 0;
Returns the current altitude above sea level in meters. Returns -9999 if no altitude is available.
course
virtual double course() const = 0;
Returns the current course in degrees [0, 360).
hdop
virtual double hdop() const = 0;
Returns the Horizontal Dilution Of Precision (HDOP) in meters, or -9999 if no HDOP value is available.
isA
bool isA(
const std::type_info & otherType
) const;
Returns true if the class is a subclass of the class given by otherType.
See also: IoT::Devices::IDevice::isA()
magneticVariation
virtual double magneticVariation() const = 0;
Returns the current magnetic variation in degrees [0, 360). Returns -1 if no magnetic variation is available.
position
virtual IoT::Devices::LatLon position() const = 0;
Returns the last obtained position.
If no position is available, latitude and longitude will both be 0. To disambiguate with a real position, also check positionAvailable().
positionAvailable
virtual bool positionAvailable() const = 0;
Returns true if a valid position is available.
remoting__enableEvents
virtual std::string remoting__enableEvents(
Poco::RemotingNG::Listener::Ptr pListener,
bool enable = bool (true)
) = 0;
Enable or disable delivery of remote events.
The given Listener instance must implement the Poco::RemotingNG::EventListener interface, otherwise this method will fail with a RemotingException.
This method is only used with Proxy objects; calling this method on a RemoteObject will do nothing.
remoting__typeId
static const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId();
Returns the TypeId of the class.
speed
virtual double speed() const = 0;
Returns the current speed in nautical knots. If no speed is available, returns -1.
type
const std::type_info & type() const;
Returns the type information for the object's class.
See also: IoT::Devices::IDevice::type()
Variables
positionLost
Poco::BasicEvent < void > positionLost;
positionUpdate
Poco::BasicEvent < const IoT::Devices::PositionUpdate > positionUpdate;