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 | SetDataByTag ([in] BSTR tag, [in] VARIANT data) |
HRESULT | GetDataAsByteArray ([out, retval] SAFEARRAY(BYTE)*data) |
HRESULT | SetDataAsByteArray ([in] SAFEARRAY(BYTE) data) |
HRESULT | Add ([in] BSTR tag) |
HRESULT | Remove ([in] BSTR tag) |
HRESULT | Clear () |
Definition of the IWriteContainer interface which can be used to establish a fast data exchange of grouped data elements for writing.
Use the containers when you need to access a larger set of data repetitively and with maximum update speed. For example, output data you want to write every machine cycle.
Definition at line 71 of file IWriteContainer.idl.
HRESULT IWriteContainer::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 IWriteContainer::Update | ( | void | ) |
This function updates the container by writing the data elements from the internal data collection to the control.
mlpiContainerUpdate
, where you can find further documentation. HRESULT IWriteContainer::Destroy | ( | void | ) |
This function destroys the container if it is not longer used.
mlpiContainerDestroy
, where you can find further documentation. HRESULT IWriteContainer::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 IWriteContainer::GetInformation | ( | [out, retval] struct ContainerInformation * | containerInformation | ) |
This function reads information about the container using struct IContainer::ContainerInformation.
[out] | containerInformation | Information about the container. |
HRESULT IWriteContainer::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. |
HRESULT IWriteContainer::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!
HRESULT IWriteContainer::GetDataByTag | ( | [in] BSTR | tag, |
[out, retval] VARIANT * | data | ||
) |
This function reads data for a specified tag from the containers internal data collection. This data will possibly differ from the data on the control because a write container will never read data from the control.
[in] | tag | Tag string which identifies the data element. |
[out] | data | The elements data from the internal storage. |
HRESULT IWriteContainer::SetDataByTag | ( | [in] BSTR | tag, |
[in] VARIANT | data | ||
) |
This function writes data for a specified tag to the container. To update the data on the control you need to call Update afterwards.
[in] | tag | Tag string which identifies the data element. |
[in] | data | The elements data to write to the internal storage. |
HRESULT IWriteContainer::GetDataAsByteArray | ( | [out, retval] SAFEARRAY(BYTE)* | data | ) |
This function reads all data as byte array from the container. This data will possibly differ from the data on the control because a write container will never read data from the control.
[out] | data | The complete data from the internal storage. |
HRESULT IWriteContainer::SetDataAsByteArray | ( | [in] SAFEARRAY(BYTE) | data | ) |
This function writes all data as byte array to the container. To update the data on the control you need to call Update afterwards. The size of the byte array needs to match the size of all data elements specified in the containers tag list.
[in] | data | The complete data to write to the internal storage. |
HRESULT IWriteContainer::Add | ( | [in] BSTR | tag | ) |
This function adds a tag to the container. Each 'tag' identifies a data element which can be written. For example, a symbolic variable from the PLC or data from the output 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 IWriteContainer::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 IWriteContainer::Clear | ( | ) |
This function removes all tags of the container.