IoT::CAN

class ICANEndpoint

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

virtual ~ICANEndpoint();

Destroys the ICANEndpoint.

Member Functions

addFilter virtual

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

virtual std::string device() const = 0;

Returns the interface device name (e.g., "can0").

enableEvents virtual

virtual void enableEvents(
    bool enable = bool (true)
) = 0;

Enables or disables events for received CAN frames.

enableFD virtual

virtual void enableFD(
    bool enable = bool (true)
) = 0;

Enables or disables support for CAN-FD frames.

eventsEnabled virtual

virtual bool eventsEnabled() const = 0;

Returns true if events for received CAN frames are enabled, otherwise false.

fdEnabled virtual

virtual bool fdEnabled() const = 0;

Returns true if CAN-FD frames are enabled, otherwise false.

fdSupported virtual

virtual bool fdSupported() const = 0;

Returns true if the implementation supports CAN-FD, otherwise false.

getFilter virtual

virtual std::vector < IoT::CAN::Filter > getFilter() const = 0;

Returns the current filter.

getFilterMode virtual

virtual IoT::CAN::FilterMode getFilterMode() const = 0;

Returns the filter mode.

isA virtual

bool isA(
    const std::type_info & otherType
) const;

Returns true if the class is a subclass of the class given by otherType.

remoting__enableEvents virtual

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

static const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId();

Returns the TypeId of the class.

removeFilter virtual

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

virtual void sendCANFDFrame(
    const IoT::CAN::CANFDFrame & frame
) = 0;

Transmits the given CAN-FD frame.

sendCANFrame virtual

virtual void sendCANFrame(
    const IoT::CAN::CANFrame & frame
) = 0;

Transmits the given CAN frame.

sendFrame virtual

virtual void sendFrame(
    const IoT::CAN::CANFDFrame & frame,
    IoT::CAN::FrameType type = IoT::CAN::FrameType (IoT::CAN::CAN_FRAME_AUTO)
) = 0;

Transmit the given frame as CAN or CAN-FD frame, depending on type.

setFilter virtual

virtual void setFilter(
    const std::vector < IoT::CAN::Filter > & filter
) = 0;

Sets a frame filter for CAN messages.

setFilterMode virtual

virtual void setFilterMode(
    IoT::CAN::FilterMode mode
) = 0;

Sets the filter mode (defaults to CAN_FILTER_MODE_OR).

type virtual

const std::type_info & type() const;

Returns the type information for the object's class.

Variables

frameReceived

Poco::BasicEvent < const IoT::CAN::CANFDFrame > frameReceived;

Securely control IoT edge devices from anywhere   Connect a Device