PLCnext API Documentation 25.0.2.69
|
This class is used to read and store a single Tic frame element called IO:Frame. More...
#include <TicFrame.hpp>
Public Types | |
using | Ptr = std::shared_ptr< TicFrame > |
using | ConstPtr = std::shared_ptr< const TicFrame > |
using | PortPtr = std::shared_ptr< TicPort > |
using | BufferInfo = Arp::Io::Commons::Data::BufferInfo |
using | BitSize = Arp::Plc::Meta::Commons::BitSize |
![]() | |
using | Ptr = std::shared_ptr< TicBase > |
using | ChildPtr = ITicSerializable::Ptr |
using | ChildElements = std::vector< ChildPtr > |
![]() | |
using | Ptr = std::shared_ptr< ITicSerializable > |
Public Member Functions | |
TicFrame (const TicFrame &arg)=delete | |
TicFrame (TicFrame &&arg) noexcept | |
Default move constructor. | |
TicFrame & | operator= (const TicFrame &arg)=delete |
TicFrame & | operator= (TicFrame &&arg) noexcept |
Default move-assignment operator. | |
~TicFrame (void) override | |
Default destructor. | |
TicFrame (void) | |
Default constructor. | |
const String & | GetFrameID (void) const noexcept |
Returns the FrameId of this Tic frame. More... | |
BitSize | GetLength (void) const noexcept |
Returns the length of this Tic frame. More... | |
const BufferInfo & | GetBufferInfo (void) const |
Returns the BufferInfo instance of this Tic frame. More... | |
bool | TryReadAttribute (TicReader &reader, const String &attributeName) final |
This operation is called every time an attribute is read, to read the attributes content. More... | |
bool | TryCreateElement (const String &elementName, ChildPtr &result) final |
Factory method to create child elements. More... | |
void | OnReadEnd (void) override |
Validation method. The default implementation is just empty. More... | |
Impl & | GetImpl (void) |
For internal use only. | |
const Impl & | GetImpl (void) const |
![]() | |
TicBase (const TicBase &arg)=delete | |
TicBase (TicBase &&arg) noexcept | |
Default move constructor. | |
TicBase & | operator= (const TicBase &arg)=delete |
TicBase & | operator= (TicBase &&arg) noexcept |
Default move-assignment operator. | |
~TicBase (void) override | |
Default destructor. | |
TicBase (void) | |
Default constructor. | |
const ChildElements & | GetChildElements (void) const |
Returns all childs of this element. More... | |
void | ReadTic (TicReader &reader) final |
This operation shall be implemented by all classes which should read its context from Tic files. More... | |
void | WriteTic (TicWriter &writer) final |
This method is currently not implemented and should not be used. More... | |
virtual bool | TryReadAttribute (TicReader &reader, const String &attributeName) |
This operation is called every time an attribute is read. More... | |
virtual bool | TryCreateElement (const String &elementName, ChildPtr &result) |
Factory method to create child elements. More... | |
virtual bool | TryReadCustomAttribute (TicReader &reader, const String &attributeName) |
This operation is called every time an attribute is read. More... | |
virtual bool | TryCreateCustomElement (const String &elementName, ChildPtr &result) |
Factory method to create child elements. More... | |
virtual void | OnReadEnd (void) |
Validates the content of the current element. More... | |
Impl & | GetImpl (void) |
For internal use only. | |
const Impl & | GetImpl (void) const |
![]() | |
ITicSerializable (void)=default | |
Constructs an ITicSerializable instance. | |
ITicSerializable (const ITicSerializable &arg)=default | |
Copy constructor. | |
ITicSerializable (ITicSerializable &&arg) noexcept=default | |
Move constructor. | |
ITicSerializable & | operator= (const ITicSerializable &arg)=default |
Copy-assignment operator. | |
ITicSerializable & | operator= (ITicSerializable &&arg) noexcept=default |
Move-assignment operator. | |
virtual | ~ITicSerializable (void)=default |
Destructs this instance and frees all resources. | |
virtual void | ReadTic (TicReader &reader)=0 |
This operation shall be implemented to read the content from Tic documents. More... | |
virtual void | WriteTic (TicWriter &writer)=0 |
This operation shall be implemented to write the content to Tic documents. More... | |
Static Public Member Functions | |
static const char * | GetTicElementName (void) |
Returns the Tic name of this element called IO:Frame. More... | |
This class is used to read and store a single Tic frame element called IO:Frame.
By default this class reads the Tic attributes FrameID and Length. To add custom attributes, the method TryReadCustomAttribute needs to be overloaded by a derived class.
The factory method TryCreateCustomElement can be overloaded to create custom sub-elements. The default implementation of this class creates an instance of the type TicPorts for the Tic elements called IO:Ports.
const TicFrame::BufferInfo & Arp::Io::Commons::Configuration::TicFrame::GetBufferInfo | ( | void | ) | const |
Returns the BufferInfo instance of this Tic frame.
|
noexcept |
Returns the FrameId of this Tic frame.
|
noexcept |
Returns the length of this Tic frame.
|
static |
Returns the Tic name of this element called IO:Frame.
|
overridevirtual |
Validation method. The default implementation is just empty.
Reimplemented from Arp::Io::Commons::Configuration::TicBase.
|
finalvirtual |
Factory method to create child elements.
elementName | Name of the child to create. |
result | The created child element. |
true
if the child element was created, otherwise false
if the element should be skipped. If a Tic ports element called IO:Ports is read, an element of type TicPorts is created by default.
Reimplemented from Arp::Io::Commons::Configuration::TicBase.
|
finalvirtual |
This operation is called every time an attribute is read, to read the attributes content.
This operation reads the value of the attribute from the given TicReader. If the containing element should not be processed, the operation returns false
to skip the attribute.
reader | The TicReader to read the attribute value from. |
attributeName | The name of the attribute to read. |
true
if the attribute value has been read, otherwise false
if the attribute was skipped. This operation reads the attributes FrameID and Length by default.
Reimplemented from Arp::Io::Commons::Configuration::TicBase.