Inherits IDispatch.
Public Member Functions | |
HRESULT | GetName ([out, retval] BSTR *name) |
HRESULT | Update (void) |
HRESULT | Destroy (void) |
HRESULT | Create (void) |
HRESULT | GetInformation ([out, retval] struct ContainerInformation *containerInformation) |
HRESULT | GetItemInformation ([out, retval] SAFEARRAY(struct ContainerItemInformation)*containerInfo) |
HRESULT | GetTagList ([out, retval] SAFEARRAY(BSTR)*tagList) |
HRESULT | GetDataByTag ([in] BSTR tag, [out, retval] VARIANT *data) |
HRESULT | GetDataAsByteArray ([out, retval] SAFEARRAY(BYTE)*data) |
HRESULT | Add ([in] BSTR tag) |
HRESULT | Remove ([in] BSTR tag) |
HRESULT | Clear () |
Definition of the IReadContainer interface which can be used to establish a fast data exchange of grouped data elements for reading.
Use the containers when you need to access a larger set of data repetitively and with maximum update speed. For example, input data you want to read every machine cycle.
Definition at line 72 of file IReadContainer.idl.
HRESULT IReadContainer::GetName | ( | [out, retval] BSTR * | name | ) |
This function returns the identifier for this container.
[out] | name | Identifier for this container. |
mlpiContainerGetName
, where you can find further documentation. HRESULT IReadContainer::Update | ( | void | ) |
This function updates the container by reading the data elements from the control and storing it in an internal data collection.
mlpiContainerUpdate
, where you can find further documentation. HRESULT IReadContainer::Destroy | ( | void | ) |
This function destroys the container if it is not longer used.
mlpiContainerDestroy
, where you can find further documentation. HRESULT IReadContainer::Create | ( | void | ) |
This function creates the container. It will automatically be called within the Update function if the container does not exist.
mlpiContainerCreate
, where you can find further documentation. HRESULT IReadContainer::GetInformation | ( | [out, retval] struct ContainerInformation * | containerInformation | ) |
This function reads information about the container using struct IContainer::ContainerInformation.
[out] | containerInformation | Information about the container. |
mlpiContainerGetInformation
, where you can find further documentation. HRESULT IReadContainer::GetItemInformation | ( | [out, retval] SAFEARRAY(struct ContainerItemInformation)* | containerInfo | ) |
This function reads information about the container items using struct IContainer::ContainerItemInformation.
[out] | containerInfo | Information about the container items. |
mlpiContainerGetItemInformation
, where you can find further documentation. HRESULT IReadContainer::GetTagList | ( | [out, retval] SAFEARRAY(BSTR)* | tagList | ) |
This function reads the tag list of the container.
[out] | tagList | Tag list of the container. |
: GetTagList() requires the tags of the container to be valid. This is because GetTagList() verifies the tags on server side. An invalid or empty tag list will result in this method to return an error!
mlpiContainerGetTagList
, where you can find further documentation. HRESULT IReadContainer::GetDataByTag | ( | [in] BSTR | tag, |
[out, retval] VARIANT * | data | ||
) |
This function reads data for a specified tag from the container. To get updated data, you need to call Update first.
[in] | tag | Tag string which identifies the data element. |
[out] | data | The elements data from the internal storage. |
HRESULT IReadContainer::GetDataAsByteArray | ( | [out, retval] SAFEARRAY(BYTE)* | data | ) |
This function reads all data as byte array from the container. To get updated data, you need to call Update first.
[out] | data | The complete data from the internal storage. |
HRESULT IReadContainer::Add | ( | [in] BSTR | tag | ) |
This function adds a tag to the container. Each 'tag' identifies a data element which can be read. For example, a symbolic variable from the PLC or data from the input area of the I/O mapping. The first argument of a tag always defines the type of data to read or write. The following data sources are available:
LOGICLIB_MEMORY_AREA
LOGICLIB_SYMBOL
IOLIB_FIELBUS_IO
ALIGNMENT_DUMMY
[in] | tag | Tag string which identifies the data element. |
HRESULT IReadContainer::Remove | ( | [in] BSTR | tag | ) |
This function removes a tag from the container. Convention for the tags is the same as for the Add method.
[in] | tag | Tag string which identifies the data element. |
HRESULT IReadContainer::Clear | ( | ) |
This function removes all tags of the container.