File Information
Library: IoT/CAN
Package: Generated
Header: IoT/CAN/ICANEndpoint.h
Description
The CANEndpoint is used to receive and send CAN and CAN-FD frames.
Inheritance
Direct Base Classes: Poco::OSP::Service
All Base Classes: Poco::OSP::Service, Poco::RefCountedObject
Known Derived Classes: CANEndpointRemoteObject
Member Summary
Member Functions: addFilter, device, enableEvents, enableFD, eventsEnabled, fdEnabled, fdSupported, getFilter, getFilterMode, isA, remoting__enableEvents, remoting__typeId, removeFilter, sendCANFDFrame, sendCANFrame, sendFrame, setFilter, setFilterMode, type
Inherited Functions: duplicate, isA, referenceCount, release, type
Types Aliases
Ptr
using Ptr = Poco::AutoPtr < ICANEndpoint >;
Constructors
ICANEndpoint
ICANEndpoint();
Creates a ICANEndpoint.
Destructor
~ICANEndpoint
virtual ~ICANEndpoint();
Destroys the ICANEndpoint.
Member Functions
addFilter
virtual bool addFilter(
const IoT::CAN::Filter & filter
) = 0;
Adds a filter element to the frame filter.
Returns true if the filter was added, or false if the filter was already present.
device
virtual std::string device() const = 0;
Returns the interface device name (e.g., "can0").
enableEvents
virtual void enableEvents(
bool enable = bool (true)
) = 0;
Enables or disables events for received CAN frames.
enableFD
virtual void enableFD(
bool enable = bool (true)
) = 0;
Enables or disables support for CAN-FD frames.
eventsEnabled
virtual bool eventsEnabled() const = 0;
Returns true if events for received CAN frames are enabled, otherwise false.
fdEnabled
virtual bool fdEnabled() const = 0;
Returns true if CAN-FD frames are enabled, otherwise false.
fdSupported
virtual bool fdSupported() const = 0;
Returns true if the implementation supports CAN-FD, otherwise false.
getFilter
virtual std::vector < IoT::CAN::Filter > getFilter() const = 0;
Returns the current filter.
getFilterMode
virtual IoT::CAN::FilterMode getFilterMode() const = 0;
Returns the filter mode.
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: Poco::OSP::Service::isA()
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.
removeFilter
virtual bool removeFilter(
const IoT::CAN::Filter & filter
) = 0;
Removes the given filter element.
Returns true if the filter was removed, or false if no such filter was set.
sendCANFDFrame
virtual void sendCANFDFrame(
const IoT::CAN::CANFDFrame & frame
) = 0;
Transmits the given CAN-FD frame.
sendCANFrame
virtual void sendCANFrame(
const IoT::CAN::CANFrame & frame
) = 0;
Transmits the given CAN frame.
sendFrame
virtual void sendFrame(
const IoT::CAN::CANFDFrame & frame,
IoT::CAN::FrameType type = IoT::CAN::FrameType (IoT::CAN::CAN_FRAME_AUTO)
) = 0;
setFilter
virtual void setFilter(
const std::vector < IoT::CAN::Filter > & filter
) = 0;
Sets a frame filter for CAN messages.
setFilterMode
virtual void setFilterMode(
IoT::CAN::FilterMode mode
) = 0;
Sets the filter mode (defaults to CAN_FILTER_MODE_OR).
type
const std::type_info & type() const;
Returns the type information for the object's class.
See also: Poco::OSP::Service::type()
Variables
frameReceived
Poco::BasicEvent < const IoT::CAN::CANFDFrame > frameReceived;