PLCI: General information

PLCI 1.14
  • Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
General Information

PLCI is a set of functions to communicate with one or more Devices using the communication protocol of the PLC.

Important: The IEC61131 programming is not case sensitive, but the PLC and the services are case sensitive!
It makes a differens for the following example if PLC and the services are used. For the engineering and the IEC 61131 it is the same if Prog_1 or PROG_1 for a program instance name is used,
but it makes a differens for the eCLR. It will not work for Prog_1 if in the PLC Project the instance name "PROG_1" is used.

  • VarList->AddVariable("@InstanceVariables.SIMULATION.DEFAULT.PROG_1.Var5");
  • VarList->AddVariable("@InstanceVariables.SIMULATION.DEFAULT.Prog_1.Var5");

Important: It is only allowed to use this library with devices that supports PLCI.
Supported programmable logic controllers include those from the Yaskawa MPiec series.

It uses service and method handles to request data for example as device information or values of specific variables.
A service for modifying variables called DataAccessService and a service for reading or writing device information called DeviceAttributeService are implemented in Version 1.0 and above.

The help describes the functions that can be used to build an application to communicate with other devices.
An example sourcecode is provided with the setup and includes how to connect to a device, how to use the DataAccessService,
reading attributes with the DeviceAttributeService and a pattern on how to use the CArray, CString, CObject and the ClrInt64 Datatype.

Further information can be found in the chapters of the "Related Pages".

Copyright (c) 2019
Yaskawa America, Inc.
2121 Norman Dr S
Waukegan, IL 60085
USA
Phone: +1 (800) YASKAWA

E-Mail: mar.nosp@m.com@.nosp@m.yas.nosp@m.ka.nosp@m.wa.nosp@m..com
Web: https://www.yaskawa.com/

Generated on Tue Feb 26 2019 09:42:18 for PLCI by doxygen 1.8.7


PLCI: Prerequisite

  • Modules
  • Namespaces
  • Classes
Prerequisite

Windows PC with Windows 7/8.1/10
Visual Studio 2013 (Express,Premium,Enterprise) or Visual Studio 2008 for EC7 and CE5
Yaskawa MPiec Series PLC

Generated on Tue Feb 26 2019 09:42:17 for PLCI by doxygen 1.8.7
Updated on Nov 8 2019 by Yaskawa America, Inc.


PLCI: Communication

Communication

1.0 Communication with several Yaskawa MPiec Series PLCs Simultaneously

The library allows the connection to several PLCs at the same time. These connections are completely separate.
There is no influence between the individual instances of the communication infrastructure.
So the handling of connect / disconnect / timeouts need to be maintained for each connection individually.
There are no combined services and no combined subscriptions in the data access service. Such features could be realized on another layer by using this API.

​​ 1.1 Supported PLCs

The API only supports a specific set of PLCs. Please consult the product description to find out if a particular device is supported.

1.2 Connect

To connect to a device an instance of the CPlci class is needed.
Important: If PLCI is connected to a PLC, one of the connections the PLC supports is blocked for the duration of the connection.
Here the method Connect is used to establish a connection.
For the connection only the IP address is required. The parameters Port and Timeout take the standard values Port=41100 and Timeout=2000 [ms].
For special cases with long latency or a poor connection to the device the Timeout could be increased.
An Exception is thrown in case the connection could not be established.
Note: After the connection is established it is required to do regular communication with the device (e.g. read the PLCstate). Otherwise the device will terminate the connection.
Example: Polling the PLC

1.3 Disconnect

If the client application is terminated it is good practice to disconnect the communication. This can be done by the Disconnect method of the CPlci class.

Generated on Tue Feb 26 2019 09:42:17 for PLCI by doxygen 1.8.7
Updated on Nov 8 2019 by Yaskawa America, Inc.


PLCI: Example: Polling the PLC

  • Language Bindings
  • How to handle exceptions
Example: Polling the PLC
void PollingPlcStatus()
{
bool bConnected = true;
//create communication object and connect to PLC
CPlci* pConnectDLL = new CPlci();
try
{
//use an IP-Address of your Yaskawa MPiec Series PLC
pConnectDLL->Connect(IpAdress, 41100, 2000);
}
catch (CFatalException fexc)
{
bConnected = false;
}
printf("Connection status %d\n", bConnected);
while (bConnected)
{
try
{
CObject value;
//use communication object to get DeviceAttributeService
CDeviceAttributeService* pDeviceAttributeService = pConnectDLL->GetService<CDeviceAttributeService>();
if (NULL != pDeviceAttributeService)
{
pDeviceAttributeService->GetAttribute(StandardDeviceAttributes_PlcState, value);
Byte valState;
value.GetValue(valState);
printf("PLC State: %d\n", valState);
printf("\n");
}
Sleep(5000);
}
catch (CRecoverableException rexc)
{
printf("CRecoverable_error %d\n", rexc.code());
}
catch (CFatalException fexc)
{
printf("CFatal_error %d\n", fexc.code());
pConnectDLL->Disconnect();
bConnected = false;
}
catch (CException exc)
{
printf("CException %d\n", exc.code());
pConnectDLL->Disconnect();
bConnected = false;
}
}
}
Generated on Tue Feb 26 2019 09:42:17 for PLCI by doxygen 1.8.7
Updated on Nov 8 2019 by Yaskawa America, Inc.


PLCI: Use Cases

Use Cases

The PLCI can be used in different kinds of tools. This chapter explains some use cases and how the library can be used here.

1.0 HMI Driver

HMI drivers are used to connect an HMI or similar tool to the PLC. This is similar to the OPC-UA server which serves the same purpose with a standardized interface. The API can be used if OPC-UA is not an option.
HMI driver use this API to establish a connection to the PLC. Therefore they have to specify the connection string which included the transport layer protocol, the target address and optional parameters.
With a valid connection they can check whether they have accessed the correct device. They can verify e.g. the device type and the manufacturer using the Device Attributes Service.
The main task of an HMI Driver is reading and writing PLC variables. This can be done using the Data Access Service. To read variables on a regular basis a subscription can be used.
This is a collection of variables that are registered once and then read at a cyclical rate. There can be several subscriptions e.g. one for each HMI page.

1.1 Custom HMI

Another usage of the API is a custom HMI. These kind of tools provide the user interface for a machine which is written by hand without using a standard HMI. This can have several reasons: Either the UI is very simple so the user does not want to invest in an HMI tool.
Or the tasks are so complex that it is easier to do it with a traditional programming language than with a standard HMI. (e.g. accessing a data base, using other APIs of a PC, implement additional business logic besides the PLC)

1.2 Logging and Data Aggregation Tools

Logging tools can be used to track the state of a device or for searching bugs in production environments. Therefore the DataAccessService can be used to regularly read a set of values and write them e.g. to a log file.
Data Aggregation tools can collect values of several devices in order to write them e.g. to a data base. Therefore the API can be used to establish several connections to different targets. These connections can be used individually and they don't influence each other.

Generated on Tue Feb 26 2019 09:42:17 for PLCI by doxygen 1.8.7


PLCI: Adaptations

Adaptations

Currently C++ / C# .Net 3.5, .Net 4.5 Windows platform is supported. Other platforms might be added in future.

The library is available for Windows 7/8 x86/x64 as 32Bit DLL and for Windows EC7 (.Net 3.5 only) and CE5 (C++) as lib.

Generated on Tue Feb 26 2019 09:42:17 for PLCI by doxygen 1.8.7


PLCI: Transport Layers

Transport Layers

1.0 Communication via TCP/IP

The current implementation only allows a connection via TCP/IP.
The standard port to access the PLCs is 41100. Standard timeout is 2000ms. The timeout is only used for the reader and writer of the PLCI and not for the connection try.

Generated on Tue Feb 26 2019 09:42:17 for PLCI by doxygen 1.8.7


PLCI: Datatypes

Datatypes

List of supported IEC datatypes:

  • BOOL
  • BYTE
  • DINT
  • DWORD
  • INT
  • LINT
  • LREAL
  • REAL
  • SINT
  • STRING
  • TIME
  • UDINT
  • UINT
  • USINT
  • WORD

All datatypes can be used as type for an array.
Arrays of type elementary can be read complete or as single element.

In case using array of struct, it is only possible to read single elements.

Example:

Global struct element:
"@GlobalVariables.GLOBAL_USER_STRUCT.INT_OF_STRUCT"

Local Element in an array of struct:
"@InstanceVariables.RESOURCE.DEFAULT.PROG_1.ARRAY_OF_STRUCT[0].BOOL_OF_STRUCT"

Generated on Tue Feb 26 2019 09:42:17 for PLCI by doxygen 1.8.7


PLCI: Language Bindings

Language Bindings

C++ is the standard implementation of this API.

A .NET interface is available in an other setup.

1.0 C++ Interface

1.0.1 Exceptions

In the C++ implementation of the API Exceptions are used if there are issues with the communication.
All methods that perform communication with the device could throw such exceptions. The parameters of the exception class give detailed information about the cause of the exception.
How to handle exceptions

1.0.2 CObject

This class encapsulates typed values that are send to and received from the device. They are used e.g. for the device attributes in the Device Attribute Service and for the online values in the Data Access Service.
Instances of the this class can hold a value of an elementary data type or an array of such values. Additionally the type information is stored. There are overloaded methods to get and set the value of different types.

1.0.3 CString

​String class PLCI::CString is a replication of std::String and can be used as PLCI::CString (Ansi) and PLCI::CString16 (Utf16).
String can also be stored in an Object. There are methods to store, manipulate and read strings.​

1.0.4 CArray

​CArray is an replication of the standard array. It can be used as an Array of elementary data type or String or structure. ​
​There are overloaded members to set and get single elements or complete arrays. The PLCI::CArray can be transformed into a wrapped array.​

Generated on Tue Feb 26 2019 09:42:17 for PLCI by doxygen 1.8.7


PLCI: How to handle exceptions

  • Language Bindings
How to handle exceptions

PLCI has two main exceptions the user needs to handle.

  • CRecoverableException
  • CFatalException

In case of a CRecoverableException the user can decide to ignore this exception or execute a special treatment. It depends on the use case. If a CFatalException occurs the user has to diconnect and reconnect to the PLC(s).
The polling example shows how to handle exceptions.
Example: Polling the PLC


PLCI: PLCI Services

PLCI Services

The following chapters describe the different services that can be accessed by the PLCI interface.
A particular device may implement one or more services. This can vary from device to device. Therefore the client needs to query for the availability of a particular service.
Querying for a service is done via the GetService method of the CPlci class.
Example call with service as template parameter:
CDataAccessService* pDataAccessService = pPlci->GetService<CDataAccessService>();
If the device supports the specified service a reference of the service API is returned.
With this service reference all methods can be used. (there are no partially implemented services)
A standard PLC normally provides at lease the DataAccessService and the DeviceAttributesService.

  • Device attribute service
  • Data access service
  • PLC control service
  • File service


PLCI: Device attribute service

  • PLCI Services
Device attribute service

1.0 Device Attributes Service

The Device Attribute Service provides access to general attributes of a device. This includes e.g. the manufacturer and the PLC state.
For a complete list of attributes see the StandardDeviceAttributes enumeration.
Note: Currently there are no attributes that can be written to.
To use this service the device needs to be queried if it supports the DeviceAttributesService. This is done with the GetService method of the CPlci class like this:
CDeviceAttributeService* pDeviceAttributeService = cPlci->GetService<CDeviceAttributeService>();

1.1 Read Device Attributes

To read device attributes the GetAttributes method can be used. Here you specify a list of attributes and as a result you get a list of value objects back. The values can have different data types depending on the requested device attribute.
Therefore the values are represented as CObject instances. With CObject you can ask for the type and get access to the real value.

1.2 Check Device Type

An important step after connecting with a device is to verify that the device is the requested device. To ensure that at least the manufacturer and the product name need to be verified.

1.3 Retrieve PLC State

The StandardDeviceAttribute StandardDeviceAttributes_PlcState is used to get the state of the PLC.
Possible states are:

PlcOn = 0
PlcLoading = 1
PlcStarting = 2
PlcRunning = 3
PlcHaltRequested = 4
PlcHalt = 5
PlcStopping = 6
PlcStop = 7
PlcResetting = 8

PlcOn: The Plc is ready and no project is loaded
PlcLoading: Project is loading into memory
PlcStarting: Starting is executed but not done
PlcRunning: Starting has finished and Plc is executing user application
PlcHaltRequested: Breakpoint is set, but not reached.
PlcHalt: Breakpoint is reached.
PlcStopping: Stopping is performed, means the PLC is not stopped yet, but will stop soon.
PlcStop: PLC is in Stop, this is the state after PlcStopping.
PlcResetting: The project is removed from PLC but the execution is not finished right now. The following state is PlcOn.
To get the state GetAttribute() or GetAttributes() from the DeviceAttributeService is used.


PLCI: Example how to check the vendor

  • General information
Example how to check the vendor

After connection to device is established use the following source code to get the vendor and product name.

  • const unsigned ATTR_COUNT = 2;
  • Int16 attr[ATTR_COUNT] = { StandardDeviceAttributes_Manufacturer, StandardDeviceAttributes_ProductName};
  • CDeviceAttributeService* poDeviceInfoService = poConnectDLL->GetService<CDeviceAttributeService>();
  • poDeviceInfoService->GetAttributes(wrap(attr, ATTR_COUNT), values);
  • CObject& Value1 = values[0];
  • CObject& Value2 = values[1];
  • int nResult = strcmp(Value1.GetString(), "Yaskawa");
Generated on Tue Feb 26 2019 09:42:17 for PLCI by doxygen 1.8.7
Updated on Nov 8 2019 by Yaskawa America, Inc.


PLCI: Data access service

  • PLCI Services
Data access service

1.0 Data Access Service

The service can be used to read and write variables of the PLC.
To use this service the device needs to be queried whether it supports the DataAccessService. This is done with the GetService method of the CPlci class like this:
CDataAccessService* pDataAccessService = cPlci->GetService<CDataAccessService>();

1.1 Instance Path - Naming variables
The variables that are read and written need to be specified by name. These names represent a path through the instances of Programs and Function Blocks of the PLC program. Also global variables can be accessed this way.

Important: Variable names are case sensitive.
To identify a variable the path is defined in quotation marks as follows:
For global variables there is a prefix
"@GlobalVariables.MyGlobalVariableName"
"@GlobalVariables.MyGlobalIntArray[10]"
"@GlobalVariables.MyGlobalStructArray[10].ComponentA"

For local instance variables there is a prefix
"@InstanceVariables.MyResource.MyTask.MyProgram.MyProgramVariable"
"@InstanceVariables.MyResource.MyTask.MyProgram.MyFunctionBlock.MyFBVariable"
"@InstanceVariables.MyResource.MyTask.MyProgram.MyFunctionBlock.MyFBArray[10].ComponentB"

For system varaibales of type boolean, a special treatment is necessary. CIL-Generator > 3.0.0

The instance path needs an additional element: .PLCMODE_RUN.field.
With the ".field" the complete byte is returned. The address defined in the engineering (MX1.7.0) shows the bit that should be used for the variable.
For PLCMODE_RUN it is the first bit(.0 of the address). The "Bitfields" are only implemented for system variables, not for I/O driver addresses or global, instance variables without address.

1.2 Variable Lists
For Read, Write and Subscription of the DataAccessService the variables are provided by a CVariableList class.
With the AddVariable method all instance paths are added to the list before the list is used for the DataAccessService methods.
Note: After the class is provided to the DataAccessService the list must not be edited anymore.

1.3 Read a List of Variables
To read a list of variables the ReadVariables method is used. This takes a DataAccessVariableList as input and provides a CObject array as a result.
Note: if the same list is read more than once consider to use a subscription for faster access. Subscriptions takes some time to register the list of variables to the PLC but they are faster on retrieving the values.

1.4 Write a List of Variables
To write a list of variables the WriteVariables method is used. This takes a DataAccessVariableList and a CObject array with the values.

1.5 Subscribe for a list of variables
If a list is read more than once it is better to create a subscription. With a subscription the variable names are registered at the PLC only once and then the values can be requested several times.
Destroy is used to unregister the variable list from the device.
Note: Don't forget to call Destroy if the Subscription is not needed anymore. This would result in a memory leak on the client and additionally the subscription would remain active on the server until the connection is closed.

1.6 Using several Subscriptions Simultaneously
It is possible to create several subscriptions. This way there are several sets of variables that can be read with different cycles or at different times.
For example: If an HMI has several pages only the visible page needs to be updated. With a subscription for each page it is easy to just read the values that are needed.
If there are additional variables that are required independent from the HMI page they can be retrieved by an additional subscription that is read all the time.

1.7 Supported Data Types

All elementary data types including strings
complete arrays of elementary data types
elements of an array
components of a structure

1.8 Array of type elementary
If an array of elementary type is read you can decide to read a single element by using "...Array[3]" or you can just read the whole array and iterate through each element.
The following example shows how to read the complete elementary array and get each single element.

//after connection is established get the service
CDataAccessService* poDataAccessService = poConnectDLL->GetService<CDataAccessService>();
//add two arrays to the varaible list
VarList->AddVariable("@InstanceVariables.RESOURCE.DEFAULT.PROG_3.SMALL_ARRAY_OF_DINT");
VarList->AddVariable("@InstanceVariables.RESOURCE.DEFAULT.PROG_3.SMALL_ARRAY_OF_DWORD");
CArray<CObject> ReadValues;
poDataAccessService->ReadVariables(VarList, ReadValues);
//RESOURCE.DEFAULT.PROG_3.ARRAY_OF_DINT
CArray<Int32> myDintArr;
myDintArr.append(ReadValues[2].GetArray<Int32>());
for (unsigned int i = 0; i < myDintArr.capacity(); i++)
{
printf("Value %d\n", myDintArr[i]);
}
//RESOURCE.DEFAULT.PROG_3.ARRAY_OF_DWORD
CArray<UInt32> myDWORDArr;
myDWORDArr.append(ReadValues[3].GetArray<UInt32>());
for (unsigned int i = 0; i < myDWORDArr.capacity(); i++)
{
printf("Value %d\n", myDintArr[i]);
}

1.9 Behavior with Download / Download Changes of the PLC
After a download or download change the subsrcriptions are invalid and must be renewed.
The meta crc of the PLC project is the indication that an new project is downloaded or download changes has been performed.
To chek, if the meta crc of the project changed, it is necessary to use the DeviceAttributeService with the attribute ID for the meta crc: StandardDeviceAttributes_EClrMetaCRC.


PLCI: PLC control service

  • PLCI Services
PLC control service

Service to control the connected PLC. This service provides following functionality :

1.0 Control commands

1.1 Start PLC
Method to command the PLC to start with following option :
Cold: Coldstart initializes retain and non-retain variables
Warm: Warmstart initializes only non-retain
Hot: Hotstart does not initialize any variable

1.2 Stop PLC
PLC executes the stop routine

1.3 Reset PLC
Project on PLC is reseted, new download or activate bootproject is necessary
Reset can only be executed if PLC is in state "Stop", any other state will result in an recoverable error.

1.4 Activate Bootproject
Activates a downloaded bootproject

1.5 Delete Bootproject
!Important!
Before deleting the bootproject make sure to a backup to restore the project.
Delete the bootproject from the filedevice

Example: How to control the PLC and to check the current state


PLCI: Example: How to control the PLC and to check the current state

  • PLCI Services
  • PLC control service
Example: How to control the PLC and to check the current state

This example describes the user how to get the current state of the PLC (Run/Stop/On/…) and then shows how to control the PLC if it is in different states.

CPlci* poConnectDLL = new CPlci();
try
{
poConnectDLL->Connect("127.0.0.1", ConnectionPort, 2000);
}
catch (CFatalException fe)
{
}
catch (CRecoverableException re)
{
}
//Service Test
CPlcControlService* poPlcControlService = poConnectDLL->GetService<CPlcControlService>();
if (poPlcControlService != NULL)
{
CDeviceAttributeService* poDeviceAttributeService = poConnectDLL->GetService<CDeviceAttributeService>();
CObject value;
//check PLC-State
poDeviceAttributeService->GetAttribute(StandardDeviceAttributes_PlcState, value);
Byte tempByte = 0;
value.GetValue(tempByte);
if(tempByte == PlcState::PlcRunning)
{
//if PLC is running , stop PLC
poPlcControlService->StopPlc();
}
else if (tempByte == PlcState::PlcStop)
{
//nothing to do
}
}


PLCI: File service

  • PLCI Services
File service

Implementation of very simple file methods to read and write data from or to a file with a variable amount of data.

To use this service the device needs to be queried whether it supports the FileService. This is done with the GetService method of the CPlci class like this :
CFileService* pFileService = cPlci->GetService<CFileService>();
Depending on the Verison of the PLC the data send to PLC is restricted. The size for one Write can be figured out by calling GetTransferSize().
This function returns the maximum amount of Bytes that can be send in one packet to the PLC.
The maximum that can be read from the PLC cannot be specified, the end of a file is always signaled with a false as return value from read function.
It is not only possible to use filedevice specific pathes and devices, but also the eCLR internal file device can be used.
Theses pathes can be used for downliad and upload.
Use "Eclr:/Domains/ProConOS/ImageFile/Image.bin" to upload or download that stream from or to the non-volatile memory (e.g. Flash Memory).
Use "Eclr:/Domains/ProConOS/ImageFile/Meta.bin" to upload or download that stream from or to the non-volatile memory (e.g. Flash Memory).
Use "Eclr:/Domains/ProConOS/WorkSpace/Image.bin" to upload or download that stream from or to the volatile memory.
Use "Eclr:/Domains/ProConOS/WorkSpace/Meta.bin" to upload or download that stream from or to the volatile memory.

1.0 How to write
There are two ways to write a file to the PLC. You can download a complete file or download it in chunks of data. The function GetTransferSize() returns the maximum amount of bytes possible to use for one packet.
The amount can vary on the version of PLC used.
An example how to download a file can be found in the example solution of the PLCI

2.0 Service methods

2.1 OpenRead
Open a file to read from.

2.2 Read
Reads a variable amount of data from an open file.
How to read data from a file

2.3 OpenWrite
Open a file to write to or create if not existing.

2.4 Write
Write a varible amount of data to a file.

How to write data from a file How to download the bootproject to the PLC and activate it

2.5 RemoveFile
Removes a file from the connected PLC, if supported by the PLC.

2.6 Close
Close an open file


PLCI: How to read data from a file

  • PLCI Services
  • File service
How to read data from a file

The read example shows how to read back the before written data.

Int32 lFileHandle;
CArray<Byte> Data;
try
{
lFileHandle = pFileDeviceService->OpenRead("TestFile.txt");
bool bResult = true;
while (bResult)
{
bResult = pFileDeviceService->Read(lFileHandle, Data, 5000);
}
pFileDeviceService->Close(lFileHandle);
}
catch (CRecoverableException e)
{
printf("ReadFile error %d occurred\n",e.m_enOccuredError);
}
catch (CFatalException e)
{
printf("ReadFile error %d occurred\n",e.m_enOccuredError);
}


PLCI: How to write data from a file

  • PLCI Services
  • File service
How to write data from a file

The write example opens a file on the Device (PLC) and writes a specific amount of data to it.

Int32 lFileHandle;
CArray<Byte> data;
bool bFinished = false;
data.resize(9440);
try
{
lFileHandle = pFileDeviceService->OpenWrite("TestFile.txt");
memset(data.begin(), 0xCD, 9440);
pFileDeviceService->Write(lFileHandle, data);
memset(data.begin(), 0xEF, 944);
pFileDeviceService->Write(lFileHandle, data);
memset(data.begin(), 0x12, 944);
pFileDeviceService->Write(lFileHandle, data);
pFileDeviceService->Close(lFileHandle);
}
catch (CRecoverableException e)
{
printf("WriteFile error %d occurred\n",e.m_enOccuredError);
}
catch (CFatalException e)
{
printf("WriteFile error %d occurred\n",e.m_enOccuredError);
}


PLCI: How to download the bootproject to the PLC and activate it

  • PLCI Services
  • File service
How to download the bootproject to the PLC and activate it

This example shows how to download and activate a boot project. BootProjectData is an array of Byte that holds the complete boot project.
To open and read the file to download from your PC or Embedded device is not part of the example.
The boot project is downloaded in the non persistent area, if you need to download it into the persistent area(location to keep the project after restart PLC) replace "WorkSpace" with "ImageFile".

CPlci* poConnectDLL = new CPlci();
try
{
poConnectDLL->Connect("127.0.0.1", ConnectionPort, 2000);
}
catch (CFatalException fe)
{
}
catch (CRecoverableException re)
{
}
//Service Test
CFileService* poFileService = poConnectDLL->GetService<CFileService>();
lFileHandle = poFileDeviceService->OpenWrite("Eclr:/Domains/ProConOS/WorkSpace/Image.bin");
bResult = true;
poFileDeviceService->Write(lFileHandle, BootProjectData);
poFileDeviceService->Close(lFileHandle);
CPlcControlService* poPlcControlService = poConnectDLL->GetService<CPlcControlService>();
poPlcControlService->ActivateBootProject();


PLCI: Meta Data Parser

Meta Data Parser

To make it easier for the user to get an overview of the usable variables of the project an API which generates a list of variable object is implemented in the PLCI 1.1.
This chapter will give an example on how to use the API and will describe which data can be obtained and how to use the information for a data access read or write.
Further the data types string, array and BitField need a special description.

  • Example: complete parse of MetaData

1.0 Browse API
The API is designed to parse the meta data of the PLC (online or offline) to get a list of variables possible of using for other services of the PLCI.

1.1 Create browse API object
The browse API is not like the other services implemented in the PLCI. To create one browse object it is not necessary to have a valid connection to the device.
It can be allocated by using the new operator:

CMetaDataParser* pBrowseAPI = new CMetaDataParser();

Before calling the methods of the browse API the meta data file must be read. this can be done online (from the device) or offline (opened from file device).
The read data must be stored in an Array of type Byte. This array is one of the parameters of the BrowseMeta method.
After the object is allocated and the meta data is stored in an CArray<Byte> following method can be used.
1.2 Init(CArray<Byte>) method
This method starts the parsing of the meta data and stores the result in internal members, one for the local and one for the global part of the meta data.
1.3 GetMetaRoot method
By calling this method the user gets the pointer to the root element of the MetaElement object.

2.0 PLCI meta element
The MetaElement is an object that describes the parsed meta element.

2.1 How to use the information stored in the element object

2.2 Parent/child/NextElement/PreviousElement relation.

The object has four members to iterate through the objects:

  • Parent: Stores the Pointer to the Parent.
  • Child: Only the first child is stored as an entry to the next level.
  • NextElement: Is the following element in the same object level
  • PreviousElement: Is the previous element in the same level.

Example: how to iterate through objects

void CMetaDataParser::IterateChild(MetaElement* pEntryElement)
{
if (NULL != pEntryElement->GetChild())
{
MetaElement* pElement = pEntryElement->GetChild();
for (unsigned int i = 0; i < pEntryElement->GetFieldAmount(); i++)
{
if (NULL != pElement->GetChild())
{
IterateChild(pElement);
}
}
}

3.0 Special types of variables

Some Datatypes have special description objects

3.1 String
An IEC String is defined with following members:

  • s: the string itself
  • maximumLength: the length defined for the used string. If the string is user defined it can vary in length.
  • currentLength: used length for the string.

3.2 Array
An Array is defined with members for:

  • Anchor (first element of data)
    The data type of the anchor describes the element type of the array
  • LB : Could be the lower border
  • UB : upper border

In IEC an Array can be defined as follow: Array_of_Byte [10..200] of BYTE. Therefore, it can be important to know the lower and upper border.

3.3 BitField
Meta data type name: Bitfield0 .. Bitfield7

Fields of a Bitfield:

  • bit (literal)
  • mask (literal)
  • field

important: The literals cannot be read by the data access service.
The bit position is stored in the MetaElement.

Example: How to get the complete Byte masking has to be done by getting the bit position from the MetaElement.

CFileService* poFileDeviceService = poConnectDLL->GetService<CFileService>();
CDataAccessService* poDataAccessService = poConnectDLL->GetService<CDataAccessService>();
CDataAccessVariableList* VarList = poDataAccessService->CreateVarList();
VarList->AddVariable("@GlobalVariables.BIT_FIELD0.field");
CArray<CObject> ReadValues;
poDataAccessService->ReadVariables(VarList, ReadValues);
uint8 testUnit8;
testUnit8 = 50;
ReadValues[0].GetValue(testUnit8);


PLCI: Example: complete parse of MetaData

  • Meta Data Parser
Example: complete parse of MetaData

The following example describes the complete way of parsing the MetaData and store it into a file with additional information.
The example prints the information into a file. For more information view the code in the example solution.

File output:

Task: Meta2 TypeName __Meta2 | Datatype 18 ArrayType
Program: MetaProg TypeName MetaProg@MetaProg | Datatype 18 ArrayType |Size 0
@InstanceVariables.SIMULATION.Meta2.MetaProg.Var0 TypeName Int16 | Datatype 6 ArrayType |Size 2
@InstanceVariables.SIMULATION.Meta2.MetaProg.Var6 TypeName Int16 | Datatype 6 ArrayType |Size 2
@InstanceVariables.SIMULATION.Meta2.MetaProg.Var7 TypeName Double | Datatype 13 ArrayType |Size 8
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct TypeName MetaTest | Datatype 17 ArrayType |Size 135360
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaInt TypeName Int16 | Datatype 6 ArrayType |Size 2
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaWord TypeName UInt16 | Datatype 7 ArrayType |Size 2
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaDINT TypeName Int32 | Datatype 8 ArrayType |Size 4
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaBool TypeName Boolean | Datatype 2 ArrayType |Size 1
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaString TypeName IecString80 | Datatype 14 ArrayType |Size 86
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaLReal TypeName Double | Datatype 13 ArrayType |Size 8
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaSInt TypeName SByte | Datatype 4 ArrayType |Size 1
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaUSINT TypeName Byte | Datatype 5 ArrayType |Size 1
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaUInt TypeName UInt16 | Datatype 7 ArrayType |Size 2
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaUDInt TypeName UInt32 | Datatype 9 ArrayType |Size 4
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaReal TypeName Single | Datatype 12 ArrayType |Size 4
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaTime TypeName UInt32 | Datatype 9 ArrayType |Size 4
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaByte TypeName Byte | Datatype 5 ArrayType |Size 1
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.MetaDWord TypeName UInt32 | Datatype 9 ArrayType |Size 4
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.UserString10 TypeName STRING10 | Datatype 14 ArrayType |Size 16
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.UserString100 TypeName STRING100 | Datatype 14 ArrayType |Size 106
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.UserString255 TypeName STRING255 | Datatype 14 ArrayType |Size 260
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.UserString32766 TypeName STRING32766 | Datatype 14 ArrayType |Size 32772
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array1[%i] TypeName MetaArray1 | Datatype 20 ArrayType Int16 |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array2[%i] TypeName MetaArray2 | Datatype 20 ArrayType UInt16 |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array3[%i] TypeName MetaArray3 | Datatype 20 ArrayType Int32 |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array4[%i] TypeName MetaArray4 | Datatype 20 ArrayType Boolean |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array5[%i] TypeName MetaArray5 | Datatype 20 ArrayType IecString80 |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array6[%i] TypeName MetaArray6 | Datatype 20 ArrayType Double |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array7[%i] TypeName MetaArray7 | Datatype 20 ArrayType SByte |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array8[%i] TypeName MetaArray8 | Datatype 20 ArrayType Byte |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array9[%i] TypeName MetaArray9 | Datatype 20 ArrayType UInt16 |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array10[%i] TypeName MetaArray10 | Datatype 20 ArrayType UInt32 |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array11[%i] TypeName MetaArray11 | Datatype 20 ArrayType Single |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array12[%i] TypeName MetaArray12 | Datatype 20 ArrayType UInt32 |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array13[%i] TypeName MetaArray13 | Datatype 20 ArrayType Byte |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array14[%i] TypeName MetaArray14 | Datatype 20 ArrayType UInt32 |Size 20
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array15[%i] TypeName MetaArray15 | Datatype 20 ArrayType STRING10 |Size 2
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array16[%i] TypeName MetaArray16 | Datatype 20 ArrayType STRING100 |Size 2
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array17[%i] TypeName MetaArray17 | Datatype 20 ArrayType STRING255 |Size 2
@InstanceVariables.SIMULATION.Meta2.MetaProg.MetaStruct.Array18[%i] TypeName MetaArray18 | Datatype 20 ArrayType STRING32766 |Size 2
@InstanceVariables.SIMULATION.Meta2.MetaProg.GlobalPG1 TypeName Boolean | Datatype 2 ArrayType |Size 1
@InstanceVariables.SIMULATION.Meta2.MetaProg.GlobalPG2 TypeName Boolean | Datatype 2 ArrayType |Size 1
@InstanceVariables.SIMULATION.Meta2.MetaProg.GlobalPG3 TypeName Boolean | Datatype 2 ArrayType |Size 1
Example for array of array of struct:
@GlobalVariables.NewVar3[%i] TypeName MasterHeadArray | Datatype 20 ArrayType HeadArray |Size 6 | IsArray = 1 | IsElementary = 0 | IsValueType = 1
@GlobalVariables.NewVar3[%i][%i] TypeName HeadArray | Datatype 20 ArrayType ChildArray |Size 2 | IsArray = 1 | IsElementary = 0
@GlobalVariables.NewVar3[%i][%i][%i] TypeName ChildArray | Datatype 20 ArrayType MyStruct |Size 4 | IsArray = 1 | IsElementary = 0
@GlobalVariables.NewVar3[%i][%i][%i].FirstInt TypeName Int16 | Datatype 6 ArrayType |Size 2 | IsArray = 0 | IsElementary = 1
@GlobalVariables.NewVar3[%i][%i][%i].SecondInt TypeName Int16 | Datatype 6 ArrayType |Size 2 | IsArray = 0 | IsElementary = 1

The name of the program, task or the resource can be found by using the functions IsTask(), IsProgram(), IsResource().
After one of the three is found the name of the task, program or resource can be read by using the function GetName() of the MetaElement class.
In case of a structure, the type (the used structure definitions name) can be read by calling the function GetTypeName().
In this example the structure MetaStruct is the variable used in the PLC project, the type of the structure is "MetaTest".
The definition of MetaTest can be found in the PLC project, in this example it looks like:

MetaTest:
STRUCT
MetaInt :INT;
MetaWord :WORD;
MetaDINT :DINT;
MetaBool :BOOL;
MetaString :String;
MetaLReal :LREAL;
MetaSInt :SINT;
MetaUSINT :USINT;
MetaUInt :UINT;
MetaUDInt :UDINT;
MetaReal :REAL;
MetaTime :TIME;
MetaByte :BYTE;
MetaDWord :DWORD;
UserString10 :STRING10;
UserString100 :STRING100;
UserString255 :STRING255;
UserString32766 :STRING32766;
Array1 :MetaArray1;
Array2 :MetaArray2;
Array3 :MetaArray3;
Array4 :MetaArray4;
Array5 :MetaArray5;
Array6 :MetaArray6;
Array7 :MetaArray7;
Array8 :MetaArray8;
Array9 :MetaArray9;
Array10 :MetaArray10;
Array11 :MetaArray11;
Array12 :MetaArray12;
Array13 :MetaArray13;
Array14 :MetaArray14;
Array15 :MetaArray15;
Array16 :MetaArray16;
Array17 :MetaArray17;
Array18 :MetaArray18;
END_STRUCT;
Example for array of array of struct:
MyStruct :
STRUCT
FirstInt :INT;
SecondInt :INT;
END_STRUCT;
ChildArray : ARRAY[0..3] OF MyStruct;
HeadArray : ARRAY[0..1] OF ChildArray;
MasterHeadArray : ARRAY[5..10] OF HeadArray;

For more details on how to define data types in IEC refer to the documentation of the programming tool.

Used MetaElementTypes :
The used meta types are found after "Datatype".
The data types can be read by using the function GetDataType(). This function returns the datatype as MetaElementType.
Datatype 18 is a class. The classes are Tasks, Programs and Resources.
Datatype 17 is a value type. This data type is the identifier for a strcuture.
Datatype 20 is the type for an array.

Datatype 2: bool / boolean.
Datatype 4: SByte
Datatype 5: Byte
Datatype 6: Int16
Datatype 7: UInt16
Datatype 8: Int32
Datatype 9: UInt32
Datatype 12: Single
Datatype 13: Double
Datatype 14: String/User String
Datatype 20: Array. The type of the Array is stored in the class and can be read with the function GetArrayTypeName().

Create connection and connect to PLC.

CPlci* poConnectDLL = new CPlci();
try
{
poConnectDLL->Connect("127.0.0.1", 41100, 2000);
}
catch (CFatalException fe)
{
}
catch (CRecoverableException re)
{
}

Get file service and read file from PLC.

CFileService* poFileDeviceService = poConnectDLL->GetService<CFileService>();
Int32 lFileHandle;
CArray<Byte> data;
CArray<Byte> data2;
CArray<Byte> FinalFile;
bool bFinished = false;
const unsigned int myBufferSize = 900;
lFileHandle = poFileDeviceService->OpenRead("Eclr:/Domains/ProConOS/ImageFile/Meta.bin");
bool bNotFinished = true;
while (bNotFinished)
{
bNotFinished = poFileDeviceService->Read(lFileHandle, data, myBufferSize);
}
poFileDeviceService->Close(lFileHandle);

Create instance of meta data parser and parse data.

CMetaDataParser* myMetaParser = new CMetaDataParser();
myMetaParser->Init(data);
MetaElement* pInstance = NULL;
MetaElement* pTask = NULL;
MetaElement* pProgram = NULL;

open a file to store the information of the meta elements. This must not be a file, the file is only for demonstration.

//open file to write to
FILE* output_hndl = fopen("d:\\BrowseMetaTest.txt", "wt");

First get the Root of the meta elements and then iterate through the global and local values.

MetaElement* pMetaElementRoot = pMetaAPI->GetMetaRoot();
MetaElement* pInstance = NULL;
if (pMetaElementRoot->GetFieldAmount() != 0)
{
pInstance = pMetaElementRoot->GetChild();
}
if (pInstance != NULL)
{
for (int uLoop = 0; uLoop < pMetaElementRoot->GetFieldAmount(); uLoop++)
{
if (strcmp(pInstance->GetName().c_str(), "@GlobalVariables") == 0)
{
ParseGlobal(pInstance);
pInstance = pInstance->GetNextElement();
}
else
{
// Get first task
MetaElement* pTask = pInstance->GetChild();
for (int nTaskCounter = 0; nTaskCounter < pInstance->GetFieldAmount(); nTaskCounter++)
{
if (pTask != NULL && pTask->IsTask())
{
MetaElement* pProgram = pTask->GetChild();
ParseLocal(pProgram);
pTask = pTask->GetNextElement();
}
}
}
}
}

Each program is parsed with this function.

void ParseLocal(MetaElement* pProgram, FILE* output_hndl, MetaElement* pTask)
{
bool bFirst = true;
CString InstancePath;
MetaElement* pItem;
//Local print of Elements of one Task an several programs
for (unsigned int nProgramCounter = 0; nProgramCounter < pTask->GetFieldAmount(); nProgramCounter++)
{
if (NULL != pProgram && true == pProgram->IsProgram())
{
fprintf(output_hndl, "Program: %s TypeName %s | Datatype %d ArrayType %s |Size %d\n", pProgram->GetName().c_str(), pProgram->GetTypeName().c_str(), pProgram->GetDataType(), pProgram->GetArrayTypeName().c_str(), pProgram->GetDataSize());
for (unsigned int nItemCounter = 0; nItemCounter < pProgram->GetFieldAmount(); nItemCounter++)
{
if (true == bFirst)
{
pItem = pProgram->GetChild();
InstancePath = pItem->GetInstancePath();
fprintf(output_hndl, "%s TypeName %s | Datatype %d ArrayType %s |Size %d\n", InstancePath.c_str(), pItem->GetTypeName().c_str(), pItem->GetDataType(), pItem->GetArrayTypeName().c_str(), pItem->GetDataSize());
ParseMetaElements(pItem, output_hndl);
bFirst = false;
}
else
{
pItem = pItem->GetNextElement();
InstancePath = pItem->GetInstancePath();
fprintf(output_hndl, "%s TypeName %s | Datatype %d ArrayType %s |Size %d\n", InstancePath.c_str(), pItem->GetTypeName().c_str(), pItem->GetDataType(), pItem->GetArrayTypeName().c_str(), pItem->GetDataSize());
if (pItem->GetChild() != NULL)
{
ParseMetaElements(pItem, output_hndl);
}
}
}
pProgram = pProgram->GetNextElement();
bFirst = true;
}
}
}

Globals are easier to parse as the example shows.

void ParseGlobal(MetaElement* pInstance, FILE* output_hndl)
{
bool bFirst = true;
CString InstancePath;
MetaElement* pGlobalItem = NULL;
fprintf(output_hndl, "Program:%s TypeName %s Datatype %d ArrayType %s |Size %d\n", pInstance->GetName().c_str(), pInstance->GetTypeName().c_str(), pInstance->GetDataType(), pInstance->GetArrayTypeName().c_str(), pInstance->GetDataSize());
for (int i = 0; i < pInstance->GetFieldAmount(); i++)
{
if (true == bFirst)
{
pGlobalItem = pInstance->GetChild();
InstancePath = pGlobalItem->GetInstancePath();
fprintf(output_hndl, "%s TypeName %s | Datatype %d ArrayType %s |Size %d\n", InstancePath.c_str(), pGlobalItem->GetTypeName().c_str(), pGlobalItem->GetDataType(), pGlobalItem->GetArrayTypeName().c_str(), pGlobalItem->GetDataSize());
ParseMetaElements(pGlobalItem, output_hndl);
bFirst = false;
}
else
{
pGlobalItem = pGlobalItem->GetNextElement();
InstancePath = pGlobalItem->GetInstancePath();
fprintf(output_hndl, "%s TypeName %s | Datatype %d ArrayType %s |Size %d\n", InstancePath.c_str(), pGlobalItem->GetTypeName().c_str(), pGlobalItem->GetDataType(), pGlobalItem->GetArrayTypeName().c_str(), pGlobalItem->GetDataSize());
if (pGlobalItem->GetChild() != NULL)
{
ParseMetaElements(pGlobalItem, output_hndl);
}
}
}
}

Following function is called each time the iteration level gets deeper.

void ParseMetaElements(MetaElement* pFirst, FILE* output_hndl)
{
MetaElement* pItem = NULL;
CString InstancePath;
bool bFirst = true;
for (int i = 0; i < pFirst->GetFieldAmount(); i++)
{
if (true == bFirst)
{
pItem = pFirst->GetChild();
InstancePath = pItem->GetInstancePath();
fprintf(output_hndl, "%s %s | Datatype %d\n", InstancePath.c_str(), pItem->GetTypeName().c_str(), pItem->GetDataType());
ParseMetaElements(pItem, output_hndl);
bFirst = false;
}
else
{
pItem = pItem->GetNextElement();
InstancePath = pItem->GetInstancePath();
fprintf(output_hndl, "%s %s | Datatype %d\n", InstancePath.c_str(), pItem->GetTypeName().c_str(), pItem->GetDataType());
if (pItem->GetChild() != NULL)
{
ParseMetaElements(pItem, output_hndl);
}
}
}
}


PLCI: Modules

Modules
Here is a list of all modules:
Array class | Methods to have an own implementation of a std::Array
Object class | Own implementation of a std::Vector
String class | Implementation of a std::string
PLCI Metaelement class | Description of a parsed meta element
Communication class | Main functions to establish a connection and to get a service for that connection
Device attribute service | Get and Set PLC specific attributes
Data access service | Read data from PLC and write data to PLC
PLC control service | Service to control the PLC, for example Stop/Start
File service | Service for file device operations
PLCI Meta data parser | Main functions to get a list of accessible Variables to use for DataAccessService


PLCI: Array class

Classes | Functions
Array class

Methods to have an own implementation of a std::Array. More...

Classes

class | PLCI::CWrapArray< T >
Array that cannot allocate memory by it self. If an CArray is build and filled, it can be changed into an wrapped array with fixed size.
Parts can be modified but no new element can be allocated. The function to wrap an array is wrap( const T* p, unsigned uCount ).
It is an template class and can be used for all type of arrays supported by the PLCI. More...
class | PLCI::CArray< T >
Array implementation.
. More...

Functions

template<class T >
CWrapArray< T > PLCI::wrap (const T *p, unsigned uCount)
Helper function to convert an CArray to a CWrapArray. More...

Detailed Description

Methods to have an own implementation of a std::Array.

Function Documentation

template<class T >
CWrapArray<T> PLCI::wrap | ( | const T * | p,
 |  | unsigned | uCount
 | ) |  |

Helper function to convert an CArray to a CWrapArray.

Parameters
const T*
Pointer to data.
unsigned Amount of array elements.


PLCI: PLCI::CWrapArray< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CWrapArray
Public Member Functions | List of all members
PLCI::CWrapArray< T > Class Template Reference
Array class

Array that cannot allocate memory by it self. If an CArray is build and filled, it can be changed into an wrapped array with fixed size.
Parts can be modified but no new element can be allocated. The function to wrap an array is wrap( const T* p, unsigned uCount ).
It is an template class and can be used for all type of arrays supported by the PLCI. More...

Inheritance diagram for PLCI::CWrapArray< T >:
PLCI::CArray< T >

Public Member Functions

CWrapArray ()
Constructor. More...
CWrapArray (const T *p, unsigned uCount)
Constructor with parameter. More...
unsigned | size () const
size of array More...
bool | empty () const
Check if array is empty. More...
const T & | at (unsigned ix) const
Get a special position in the array. More...
T & | at (unsigned ix)
Get a special position in the array. More...
const T & | operator[] (unsigned ix) const
Const operator implementation of at method. More...
T & | operator[] (unsigned ix)
Operator implementation of at method. More...
const T & | front () const
Get first position in the array. More...
const T & | back () const
Get last position in the array. More...
const T * | data () const
Get the const pointer to the data. More...
T * | data ()
Get the pointer to the data. More...
const_iterator | begin () const
iterator at the beginning of the data. More...
iterator | begin ()
Const iterator at the beginning of the data. More...
const_iterator | end () const
iterator at the end of the data. More...
iterator | end ()
Iterator at the end of the data. More...

Detailed Description

template<class T>
class PLCI::CWrapArray< T >

Array that cannot allocate memory by it self. If an CArray is build and filled, it can be changed into an wrapped array with fixed size.
Parts can be modified but no new element can be allocated. The function to wrap an array is wrap( const T* p, unsigned uCount ).
It is an template class and can be used for all type of arrays supported by the PLCI.

Constructor & Destructor Documentation

template<class T>
PLCI::CWrapArray< T >::CWrapArray ( )
inline

Constructor.

Parameters
n
Returns
none
template<class T>
PLCI::CWrapArray< T >::CWrapArray | ( | const T * | p,
 |  | unsigned | uCount
 | ) |  |
inline

Constructor with parameter.

Parameters
T n Template parameter of pointer.
uCount
unsigned value of item amount in array.
Returns
none

Member Function Documentation

template<class T>
const T& PLCI::CWrapArray< T >::at ( unsigned ix ) const
inline

Get a special position in the array.

Parameters
unsigned
Index of the array to be returned
Returns
const T
Const template parameter representing the type element of the array.
template<class T>
T& PLCI::CWrapArray< T >::at ( unsigned ix )
inline

Get a special position in the array.

Parameters
unsigned
Index of the array to be returned
Returns
T
Template parameter representing the type element of the array.
template<class T>
const T& PLCI::CWrapArray< T >::back ( ) const
inline

Get last position in the array.

Parameters
none
Returns
T
Array at position [size -1]
template<class T>
const_iterator PLCI::CWrapArray< T >::begin ( ) const
inline

iterator at the beginning of the data.

Parameters
none
Returns
const iterator
template<class T>
iterator PLCI::CWrapArray< T >::begin ( )
inline

Const iterator at the beginning of the data.

Parameters
none
Returns
iterator
template<class T>
const T* PLCI::CWrapArray< T >::data ( ) const
inline

Get the const pointer to the data.

Parameters
none
Returns
const T
Get the pointer to the data of the array.
template<class T>
T* PLCI::CWrapArray< T >::data ( )
inline

Get the pointer to the data.

Parameters
none
Returns
T
Get the pointer to the data of the array.
template<class T>
bool PLCI::CWrapArray< T >::empty ( ) const
inline

Check if array is empty.

Parameters
none
Returns
bool
return value is true if array is empty, otherwise false is returned.
template<class T>
const_iterator PLCI::CWrapArray< T >::end ( ) const
inline

iterator at the end of the data.

Parameters
none
Returns
const iterator
template<class T>
iterator PLCI::CWrapArray< T >::end ( )
inline

Iterator at the end of the data.

Parameters
none
Returns
iterator
template<class T>
const T& PLCI::CWrapArray< T >::front ( ) const
inline

Get first position in the array.

Parameters
none
Returns
T
Array at position [0]
template<class T>
const T& PLCI::CWrapArray< T >::operator[] ( unsigned ix ) const
inline

Const operator implementation of at method.

Parameters
unsigned
Index of the array to be returned
Returns
T
Const template parameter representing the type element of the array.
template<class T>
T& PLCI::CWrapArray< T >::operator[] ( unsigned ix )
inline

Operator implementation of at method.

Parameters
unsigned
Index of the array to be returned
Returns
T
Template parameter representing the type element of the array.
template<class T>
unsigned PLCI::CWrapArray< T >::size ( ) const
inline

size of array

Parameters
none
Returns
unsigned
size of the array.


PLCI: PLCI::CArray< T > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CArray
Public Member Functions | List of all members
PLCI::CArray< T > Class Template Reference
Array class

Array implementation.
. More...

Inheritance diagram for PLCI::CArray< T >:
PLCI::CWrapArray< T >

Public Member Functions

CArray ()
Constructor of Array. More...
CArray (const CArray< T > &a)
Constructor of Array. More...
void | operator= (const CArray< T > &a)
Overloaded assignment operator.
Assigns values from right side operands to left side operand. More...
unsigned | capacity () const
Get the left space of the array. More...
void | clear ()
Zeros the amount of elements. More...
void | erase (unsigned ix, unsigned uCount=1)
Erase one or more elements of the array.
. More...
void | resize (unsigned uCount)
Increase the amount of elements of the array. More...
void | push_back (const T &a)
Store an element back to the array. More...
void | pop_back ()
Unchain last element out of array. More...
void | append (const CWrapArray< T > &ar)
Append data to an array. More...
- Public Member Functions inherited from PLCI::CWrapArray< T >
CWrapArray ()
Constructor. More...
CWrapArray (const T *p, unsigned uCount)
Constructor with parameter. More...
unsigned | size () const
size of array More...
bool | empty () const
Check if array is empty. More...
const T & | at (unsigned ix) const
Get a special position in the array. More...
T & | at (unsigned ix)
Get a special position in the array. More...
const T & | operator[] (unsigned ix) const
Const operator implementation of at method. More...
T & | operator[] (unsigned ix)
Operator implementation of at method. More...
const T & | front () const
Get first position in the array. More...
const T & | back () const
Get last position in the array. More...
const T * | data () const
Get the const pointer to the data. More...
T * | data ()
Get the pointer to the data. More...
const_iterator | begin () const
iterator at the beginning of the data. More...
iterator | begin ()
Const iterator at the beginning of the data. More...
const_iterator | end () const
iterator at the end of the data. More...
iterator | end ()
Iterator at the end of the data. More...

Detailed Description

template<class T>
class PLCI::CArray< T >

Array implementation.
.

Constructor & Destructor Documentation

template<class T>
PLCI::CArray< T >::CArray ( )
inline

Constructor of Array.

Parameters
none n
Returns
T
Type is template parameter
template<class T>
PLCI::CArray< T >::CArray ( const CArray< T > & a )
inline

Constructor of Array.

Parameters
CArray of Type T
Returns
none

Member Function Documentation

template<class T>
void PLCI::CArray< T >::append ( const CWrapArray< T > & ar )
inline

Append data to an array.

Parameters
Array of template type T
Returns
none
template<class T>
unsigned PLCI::CArray< T >::capacity ( ) const
inline

Get the left space of the array.

Parameters
n
Returns
unsigned
Amount of reserve in the array
template<class T>
void PLCI::CArray< T >::clear ( )
inline

Zeros the amount of elements.

Parameters
none n
Returns
none
template<class T>
void PLCI::CArray< T >::erase | ( | unsigned | ix,
 |  | unsigned | uCount = 1
 | ) |  |
inline

Erase one or more elements of the array.
.

Parameters
ix | n Element marking the start of the first element to be erased.
uCount | n The amount of elements to be erased starting with the first element marked by ix
Returns
none
template<class T>
void PLCI::CArray< T >::operator= ( const CArray< T > & a )
inline

Overloaded assignment operator.
Assigns values from right side operands to left side operand.

Parameters
Array of template Type
Returns
none
template<class T>
void PLCI::CArray< T >::pop_back ( )
inline

Unchain last element out of array.

Parameters
none
Returns
none
template<class T>
void PLCI::CArray< T >::push_back ( const T & a )
inline

Store an element back to the array.

Parameters
Template parameter T&
Array element to be pushed back
Returns
none
template<class T>
void PLCI::CArray< T >::resize ( unsigned uCount )
inline

Increase the amount of elements of the array.

Parameters
uCount n Amount of new elements
Returns
none


PLCI: Object class

Classes
Object class

Own implementation of a std::Vector. More...

Classes

class PLCI::CObject
This class encapsulates typed values that are send to and received from the device. They are used e.g. for the device attributes in the Device Attribute Service and for the online values in the Data Access Service. Instances of the this class can hold a value of an elementary data type or an array of such values.Additionally the type information is stored.There are overloaded methods to get and set the value of different types. More...

Detailed Description

Own implementation of a std::Vector.


PLCI: PLCI::CObject Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CObject
Public Member Functions | List of all members
PLCI::CObject Class Reference
Object class

This class encapsulates typed values that are send to and received from the device. They are used e.g. for the device attributes in the Device Attribute Service and for the online values in the Data Access Service. Instances of the this class can hold a value of an elementary data type or an array of such values.Additionally the type information is stored.There are overloaded methods to get and set the value of different types. More...

Public Member Functions

CObject ()
Constructor of CObject. More...
CObject (const CObject &a)
Constructor of CObject. More...
void | operator= (const CObject &a)
Assignment operator. More...
~CObject ()
Destructor of CObject. More...
void | Read (PLCI_internal::CBinaryReaderBase &rd)
Method to read an object from the received stream. More...
void | Write (PLCI_internal::CBinaryWriterBase &wr) const
Method to write an object to the send buffer. More...
bool | IsElementary () const
Method to test if object type is elementary type. More...
bool | IsString () const
Method to test if object type is string. More...
bool | IsValueType () const
Method to test if object type is value type. More...
bool | IsArray () const
Method to test if object type is array. More...
bool | IsElementaryArray () const
Method to test if object type is elementary array. More...
bool | IsStringArray () const
Method to test if object type is string array. More...
bool | IsStringPtrArray () const
Method to test if object type is string pointer array (const char*). More...
MetaElementType | GetType () const
Get the type of the object. More...
MetaElementType | GetArrayType () const
If type is array, the method GetArrayType will get the type of the element of the array. More...
template<class T >
void | GetValue (T &val) const
Get the data out of the object.
. More...
void | GetValue (ClrInt64 &val) const
Method to get ClrInt64 value out of an object element. More...
void | SetValue (bool val)
SetValue is an overloaded method to store an elementary data type into an object. More...
CWrapArray< Byte > | GetByteArray ()
Method to get the value as a byte array. More...
const CWrapArray< Byte > | GetByteArray () const
Method to get the value as a byte array. More...
unsigned | GetArrayLength () const
Get the length of the array. More...
template<class T >
CWrapArray< T > | GetArray ()
Get a reference to the array. More...
template<class T >
const CWrapArray< T > | GetArray () const
Get a reference to the array. More...
void | SetArrayPtr (void *p, MetaElementType uElementType, unsigned uElementCount)
set array pointer without ownership, (array is not copied) More...
void | SetArray (void *p, MetaElementType uElementType, unsigned uElementCount)
Copy array for use with elementary data types only. More...
template<class T >
void | GetValueAt (unsigned ix, T &t) const
void | SetString (const char *p, Encoding e=CString::DefaultEncoding())
Copy the string. More...
void | SetWString (const wchar_t *p)
Copy the utf16 string. More...
Encoding | GetEncoding () const
Method to return the encoding from the string object. More...
const char * | GetString () const
Return the data from the string object. More...
const wchar_t * | GetWString () const
Return the data from the utf16 string object. More...
const CWrapArray< CString > | GetStringArray () const
Get the const string array out of an object. More...
CWrapArray< CString > GetStringArray ()
Get the string array out of an object. More...
const CWrapArray< CWString > | GetWStringArray () const
Get the const utf16 string array out of an object. More...
CWrapArray< CWString > GetWStringArray ()
Get the utf16 string array out of an object. More...
void | SetStringArray (const CWrapArray< CString > &ar)
Copy all strings. More...
void | SetStringArray (const CWrapArray< const char * > &ar)
Copy all strings. More...
const CWrapArray< const char * > | GetStringPtrArray () const
Get const string pointer array out of an object. More...
CWrapArray< const char * > | GetStringPtrArray ()
Get string pointer array out of an object. More...

Detailed Description

This class encapsulates typed values that are send to and received from the device. They are used e.g. for the device attributes in the Device Attribute Service and for the online values in the Data Access Service. Instances of the this class can hold a value of an elementary data type or an array of such values.Additionally the type information is stored.There are overloaded methods to get and set the value of different types.

Constructor & Destructor Documentation

PLCI::CObject::CObject ( )

Constructor of CObject.

Parameters
none
Returns
none
PLCI::CObject::CObject ( const CObject & a )

Constructor of CObject.

Parameters
const CObject& a
Address to an existing object.
Returns
none
PLCI::CObject::~CObject ( )

Destructor of CObject.

Parameters
none
Returns
none

Member Function Documentation

template<class T >
CWrapArray<T> PLCI::CObject::GetArray ( )
inline

Get a reference to the array.

Parameters
none
Returns
template<class T> CWrapArray<T>
Reference to the type of array as wrapped array is returned.
template<class T >
const CWrapArray<T> PLCI::CObject::GetArray ( ) const
inline

Get a reference to the array.

Parameters
none
Returns
template<class T> const CWrapArray<T>
Reference to the type of array as wrapped array is returned.
unsigned PLCI::CObject::GetArrayLength ( ) const
inline

Get the length of the array.

Parameters
none
Returns
unsigned
Amount of elements in the array
MetaElementType PLCI::CObject::GetArrayType ( ) const
inline

If type is array, the method GetArrayType will get the type of the element of the array.

Parameters
none
Returns
MetaElementType
Type of object
CWrapArray<Byte> PLCI::CObject::GetByteArray ( )
inline

Method to get the value as a byte array.

Parameters
none n
Returns
CWrapArray<Byte>
Byte array
const CWrapArray<Byte> PLCI::CObject::GetByteArray ( ) const
inline

Method to get the value as a byte array.

Parameters
none n
Returns
const CWrapArray<Byte>
Byte array
Encoding PLCI::CObject::GetEncoding ( ) const
inline

Method to return the encoding from the string object.

Parameters
none
Returns
Encoding
const char* PLCI::CObject::GetString ( ) const
inline

Return the data from the string object.

Parameters
none
Returns
const char*
Data from string is returned
const CWrapArray<CString> PLCI::CObject::GetStringArray ( ) const
inline

Get the const string array out of an object.

Parameters
none
Returns
const wrapped string array
CWrapArray<CString> PLCI::CObject::GetStringArray ( )
inline

Get the string array out of an object.

Parameters
none
Returns
wrapped string array
const CWrapArray<const char*> PLCI::CObject::GetStringPtrArray ( ) const
inline

Get const string pointer array out of an object.

Parameters
none
Returns
const wrapped string pointer array
CWrapArray<const char*> PLCI::CObject::GetStringPtrArray ( )
inline

Get string pointer array out of an object.

Parameters
none
Returns
wrapped string pointer array
MetaElementType PLCI::CObject::GetType ( ) const
inline

Get the type of the object.

Parameters
none n
Returns
MetaElementType
Type of object
template<class T >
void PLCI::CObject::GetValue ( T & val ) const
inline

Get the data out of the object.
.

Parameters
T& val
Template variable of type elementary data type
Returns
none
void PLCI::CObject::GetValue ( ClrInt64 & val ) const
inline

Method to get ClrInt64 value out of an object element.

Parameters
ClrInt64& val
Variable to store the data.
Returns
none
template<class T >
void PLCI::CObject::GetValueAt | ( | unsigned | ix,
 |  | T & | t
 | ) |  | const
 inline
Parameters
unsigned ix
Index of value
T& t
Address to value to be returned
Returns
none
const wchar_t* PLCI::CObject::GetWString ( ) const
inline

Return the data from the utf16 string object.

Parameters
none
Returns
const wchar_t*
Data from string is returned
const CWrapArray<CWString> PLCI::CObject::GetWStringArray ( ) const
inline

Get the const utf16 string array out of an object.

Parameters
none
Returns
const wrapped utf16 string array
CWrapArray<CWString> PLCI::CObject::GetWStringArray ( )
inline

Get the utf16 string array out of an object.

Parameters
none
Returns
wrapped utf16 string array
bool PLCI::CObject::IsArray ( ) const
inline

Method to test if object type is array.

Parameters
none
Returns
True if array, false if not.
bool PLCI::CObject::IsElementary ( ) const
inline

Method to test if object type is elementary type.

Parameters
none
Returns
True if elementary, false if not.
bool PLCI::CObject::IsElementaryArray ( ) const
inline

Method to test if object type is elementary array.

Parameters
none
Returns
True if elementary array, false if not.
bool PLCI::CObject::IsString ( ) const
inline

Method to test if object type is string.

Parameters
none
Returns
True if string, false if not.
bool PLCI::CObject::IsStringArray ( ) const
inline

Method to test if object type is string array.

Parameters
none
Returns
True if string array, false if not.
bool PLCI::CObject::IsStringPtrArray ( ) const
inline

Method to test if object type is string pointer array (const char*).

Parameters
none
Returns
True if string pointer array, false if not.
bool PLCI::CObject::IsValueType ( ) const
inline

Method to test if object type is value type.

Parameters
none
Returns
True if value type, false if not.
void PLCI::CObject::operator= ( const CObject & a )

Assignment operator.

Parameters
const CObject& a
Address to object
Returns
none
void PLCI::CObject::Read ( PLCI_internal::CBinaryReaderBase & rd )

Method to read an object from the received stream.

Parameters
CBinaryReaderBase& rd
Reference to the binary reader CBinaryReader
Returns
none
void PLCI::CObject::SetArray | ( | void * | p,
 |  | MetaElementType | uElementType,
 |  | unsigned | uElementCount
 | ) |  |

Copy array for use with elementary data types only.

Parameters
void* p
Pointer to data
MetaElementType uElementType
Array type
unsigned uElementCount
Array length
Returns
none
void PLCI::CObject::SetArrayPtr | ( | void * | p,
 |  | MetaElementType | uElementType,
 |  | unsigned | uElementCount
 | ) |  |

set array pointer without ownership, (array is not copied)

Parameters
void* p
Pointer to data
MetaElementType uElementType
Array type
unsigned uElementCount
Array length
Returns
none
void PLCI::CObject::SetString | ( | const char * | p,
 |  | Encoding | e = CString::DefaultEncoding()
 | ) |  |
inline

Copy the string.

Parameters
const char* p
Pointer to characters
Parameter with default string encoding
Encoding is taken from string object.
Returns
none
void PLCI::CObject::SetStringArray ( const CWrapArray< CString > & ar )

Copy all strings.

Parameters
const CWrapArray<CString>& ar
wrapped array of strings
Returns
none
void PLCI::CObject::SetStringArray ( const CWrapArray< const char * > & ar )

Copy all strings.

Parameters
const CWrapArray<const char*>& ar
wrapped array of const chars
Returns
none
void PLCI::CObject::SetValue ( bool val )
inline

SetValue is an overloaded method to store an elementary data type into an object.

Parameters
bool val
wchar_t val
char val
sint8 val
uint8 val
sint16 val
uint16 val
sint32 val
uint32 val
unsigned long val
sint64 val
uint64 val
Single val
Double val
const char*l val
const wchar_t* val
Returns
none
void PLCI::CObject::SetWString ( const wchar_t * p )
inline

Copy the utf16 string.

Parameters
const wchar_t* p
Pointer to characters
Returns
none
void PLCI::CObject::Write ( PLCI_internal::CBinaryWriterBase & wr ) const

Method to write an object to the send buffer.

Parameters
CBinaryWriterBase& rd
Reference to the binary reader CBinaryReader
Returns
none


PLCI: String class

Classes
String class

Implementation of a std::string. More...

Classes

class | PLCI::CBaseString
Base string implementation.
. More...
class | PLCI::TString< T, E >
Template implementation of methods used by Ansi or Utf16 strings.
. More...
class | PLCI::CString
String implementation for Ansi encoding.
. More...

Detailed Description

Implementation of a std::string.


PLCI: PLCI::CBaseString Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CBaseString
Public Member Functions | Static Public Member Functions | List of all members
PLCI::CBaseString Class Reference
String class

Base string implementation.
. More...

Inheritance diagram for PLCI::CBaseString:
PLCI::TString< T, E > PLCI::TString< char, Encoding_Ansi > PLCI::TString< wchar_t, E > PLCI::CString PLCI::CString16< Encoding_Utf16 > PLCI::CString16< E >

Public Member Functions

CBaseString ()
Constructor of base string. More...
CBaseString (const CBaseString &a)
Constructor of base string. More...
~CBaseString ()
Destructor of a base string. More...
void | operator= (const CBaseString &)
Overloaded assignment operator. More...
void | clear ()
Clear string. More...
Encoding | GetEncoding () const
Check the encoding of the string. More...
unsigned | length () const
Get the length of the string. More...
bool | empty () const
Check if string is empty or not. More...

Static Public Member Functions

static unsigned length (const void *p, Encoding encoding)
Get the length of the string. More...

Detailed Description

Base string implementation.
.

Constructor & Destructor Documentation

PLCI::CBaseString::CBaseString ( )
inline

Constructor of base string.

Parameters
none
Returns
none
PLCI::CBaseString::CBaseString ( const CBaseString & a )
inline

Constructor of base string.

Parameters
CBaseString &
Assign another base string
Returns
none
PLCI::CBaseString::~CBaseString ( )
inline

Destructor of a base string.

Parameters
none
Returns
none

Member Function Documentation

void PLCI::CBaseString::clear ( )

Clear string.

Parameters
CHead pointer
Pointer to StringBase class
Returns
none
bool PLCI::CBaseString::empty ( ) const
inline

Check if string is empty or not.

Parameters
none
Returns
True in case string is empty, otherwise false is returned.
Encoding PLCI::CBaseString::GetEncoding ( ) const
inline

Check the encoding of the string.

Parameters
none
Returns
Encoding
Encoding_None = 0
Encoding_Ansi = 1
Encoding_Utf8 = 2
Encoding_Utf16 = 3
static unsigned PLCI::CBaseString::length | ( | const void * | p,
 |  | Encoding | encoding
 | ) |  |
static

Get the length of the string.

Parameters
Pointer to string
Encoding of the string
Returns
length as unsigned value
unsigned PLCI::CBaseString::length ( ) const
inline

Get the length of the string.

Parameters
none
Returns
length as unsigned value
void PLCI::CBaseString::operator= ( const CBaseString & )

Overloaded assignment operator.

Parameters
Base string address
Returns
none


PLCI: PLCI::TString< T, E > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • TString
Public Member Functions | Static Public Member Functions | List of all members
PLCI::TString< T, E > Class Template Reference
String class

Template implementation of methods used by Ansi or Utf16 strings.
. More...

Inheritance diagram for PLCI::TString< T, E >:
PLCI::CBaseString

Public Member Functions

void | operator= (const TString &a)
Assignment operator.
. More...
void | set (const T *p, unsigned len=-1)
add characters to string. More...
const T * | c_str () const
Return the const char pointer of the Ansi or Utf16 string. More...
void | operator+= (const T *p)
Append characters to a string. More...
void | operator+= (const TString &a)
Append string to a string. More...
T | at (size_t pos) const
Accesses specified byte. More...
T | operator[] (size_t pos) const
Accesses specified byte. More...
TString | Left (int nCount) const
TString | Right (int nCount) const
size_t | find_first_of (const T *s, unsigned pos=0) const
Find first occurrence of characters. More...
size_t | find_last_of (const T *s, unsigned pos=-1) const
Find last occurrence of characters. More...
size_t | find_first_not_of (const T *s, unsigned pos=0) const
Finds the first character equal to none of the characters in the given character sequence. More...
- Public Member Functions inherited from PLCI::CBaseString
CBaseString ()
Constructor of base string. More...
CBaseString (const CBaseString &a)
Constructor of base string. More...
~CBaseString ()
Destructor of a base string. More...
void | operator= (const CBaseString &)
Overloaded assignment operator. More...
void | clear ()
Clear string. More...
Encoding | GetEncoding () const
Check the encoding of the string. More...
unsigned | length () const
Get the length of the string. More...
bool | empty () const
Check if string is empty or not. More...

Static Public Member Functions

static Encoding | DefaultEncoding ()
Get the encoding of the string. More...
- Static Public Member Functions inherited from PLCI::CBaseString
static unsigned | length (const void *p, Encoding encoding)
Get the length of the string. More...

Detailed Description

template<class T, Encoding E>
class PLCI::TString< T, E >

Template implementation of methods used by Ansi or Utf16 strings.
.

Member Function Documentation

template<class T, Encoding E>
T PLCI::TString< T, E >::at ( size_t pos ) const
inline

Accesses specified byte.

Parameters
pos
Position of the character to return.
Returns
Reference to the requested character.
template<class T, Encoding E>
const T* PLCI::TString< T, E >::c_str ( ) const
inline

Return the const char pointer of the Ansi or Utf16 string.

Parameters
none n
Returns
Const char*
template<class T, Encoding E>
static Encoding PLCI::TString< T, E >::DefaultEncoding ( )
inlinestatic

Get the encoding of the string.

Parameters
none
Returns
Encoding
Encoding_None = 0
Encoding_Ansi = 1
Encoding_Utf8 = 2
Encoding_Utf16 = 3
template<class T, Encoding E>
size_t PLCI::TString< T, E >::find_first_not_of | ( | const T * | s,
 |  | unsigned | pos = 0
 | ) |  | const
 inline

Finds the first character equal to none of the characters in the given character sequence.

Parameters
const T* s
Character to find in string pointed to by s.
Returns
Position of the found character or -1 if no such character is found.
template<class T, Encoding E>
size_t PLCI::TString< T, E >::find_first_of | ( | const T * | s,
 |  | unsigned | pos = 0
 | ) |  | const
 inline

Find first occurrence of characters.

Parameters
const T* s
Character to find in string pointed to by s.
Returns
Position of the found character or -1 if no such character is found.
template<class T, Encoding E>
size_t PLCI::TString< T, E >::find_last_of | ( | const T * | s,
 |  | unsigned | pos = -1
 | ) |  | const
 inline

Find last occurrence of characters.

Parameters
const T* s
Character to find in string pointed to by s.
Returns
Position of the found character or -1 if no such character is found.
template<class T, Encoding E>
TString PLCI::TString< T, E >::Left ( int nCount ) const
inline
Parameters
n
Returns

template<class T, Encoding E>
void PLCI::TString< T, E >::operator+= ( const T * p )
inline

Append characters to a string.

Parameters
const T*
Characters to be added as const pointer.
Returns
none
template<class T, Encoding E>
void PLCI::TString< T, E >::operator+= ( const TString< T, E > & a )
inline

Append string to a string.

Parameters
const TStringg&
Adress of a string to be added.
Returns
none
template<class T, Encoding E>
void PLCI::TString< T, E >::operator= ( const TString< T, E > & a )
inline

Assignment operator.
.

Parameters
const TString& a
String to be assigned.
Returns
none
template<class T, Encoding E>
T PLCI::TString< T, E >::operator[] ( size_t pos ) const
inline

Accesses specified byte.

Parameters
pos
Position of the character to return.
Returns
Reference to the requested character.
template<class T, Encoding E>
TString PLCI::TString< T, E >::Right ( int nCount ) const
inline
Parameters
n
Returns

template<class T, Encoding E>
void PLCI::TString< T, E >::set | ( | const T * | p,
 |  | unsigned | len = -1
 | ) |  |
inline

add characters to string.

Parameters
T* n Pointer to characters to be added to string
Returns
none


PLCI: PLCI::CString Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CString
Public Member Functions | List of all members
PLCI::CString Class Reference
String class

String implementation for Ansi encoding.
. More...

Inheritance diagram for PLCI::CString:
PLCI::TString< char, Encoding_Ansi > PLCI::CBaseString

Public Member Functions

CString ()
Constructor of the CString. More...
CString (const char *ps)
Constructor of the CString. More...
CString (const BASE &a)
Constructor of the CString. More...
void | operator= (const char *p)
Assigns values to the string. More...
int | CompareNoCase (const BASE &a) const
compares two strings More...
int | compare (const char *p2) const
Compares two character sequences. More...
int | compare (const BASE &a) const
Compares two character sequences. More...
bool | operator== (const char *p2) const
Lexicographically compares two strings. More...
bool | operator!= (const char *p2) const
Lexicographically compares two strings. More...
bool | operator== (const BASE &a) const
Lexicographically compares two strings. More...
bool | operator!= (const BASE &a) const
Lexicographically compares two strings. More...
bool | operator< (const BASE &a) const
Lexicographically compares two strings. More...
- Public Member Functions inherited from PLCI::TString< char, Encoding_Ansi >
void | operator= (const TString &a)
Assignment operator.
. More...
void | set (const char *p, unsigned len=-1)
add characters to string. More...
const char * | c_str () const
Return the const char pointer of the Ansi or Utf16 string. More...
void | operator+= (const char *p)
Append characters to a string. More...
void | operator+= (const TString &a)
Append string to a string. More...
char | at (size_t pos) const
Accesses specified byte. More...
char | operator[] (size_t pos) const
Accesses specified byte. More...
TString | Left (int nCount) const
TString | Right (int nCount) const
size_t | find_first_of (const char *s, unsigned pos=0) const
Find first occurrence of characters. More...
size_t | find_last_of (const char *s, unsigned pos=-1) const
Find last occurrence of characters. More...
size_t | find_first_not_of (const char *s, unsigned pos=0) const
Finds the first character equal to none of the characters in the given character sequence. More...
- Public Member Functions inherited from PLCI::CBaseString
CBaseString ()
Constructor of base string. More...
CBaseString (const CBaseString &a)
Constructor of base string. More...
~CBaseString ()
Destructor of a base string. More...
void | operator= (const CBaseString &)
Overloaded assignment operator. More...
void | clear ()
Clear string. More...
Encoding | GetEncoding () const
Check the encoding of the string. More...
unsigned | length () const
Get the length of the string. More...
bool | empty () const
Check if string is empty or not. More...

Additional Inherited Members

- Static Public Member Functions inherited from PLCI::TString< char, Encoding_Ansi >
static Encoding | DefaultEncoding ()
Get the encoding of the string. More...
- Static Public Member Functions inherited from PLCI::CBaseString
static unsigned | length (const void *p, Encoding encoding)
Get the length of the string. More...

Detailed Description

String implementation for Ansi encoding.
.

Constructor & Destructor Documentation

PLCI::CString::CString ( )
inline

Constructor of the CString.

Parameters
none
Returns
none
PLCI::CString::CString ( const char * ps )
inline

Constructor of the CString.

Parameters
const char*
Returns
none
PLCI::CString::CString ( const BASE & a )
inline

Constructor of the CString.

Parameters
const String&
Returns
none

Member Function Documentation

int PLCI::CString::compare ( const char * p2 ) const
inline

Compares two character sequences.

Parameters
const char* p2
Returns
Negative value if this string is less than the other character sequence, zero if the both character sequences are equal, positive value if this string is greater than the other character sequence.
int PLCI::CString::compare ( const BASE & a ) const
inline

Compares two character sequences.

Parameters
const BASE& a
Returns
Negative value if this string is less than the other character sequence, zero if the both character sequences are equal, positive value if this string is greater than the other character sequence.
int PLCI::CString::CompareNoCase ( const BASE & a ) const
inline

compares two strings

Parameters
const BASE& a
String to use for compare
Returns
Negative value if this string is less than the other character sequence, zero if the both character sequences are equal, positive value if this string is greater than the other character sequence.
bool PLCI::CString::operator!= ( const char * p2 ) const
inline

Lexicographically compares two strings.

Parameters
const char* p2
Const char to be compared with own data.
Returns
True if not equal, false if equal.
bool PLCI::CString::operator!= ( const BASE & a ) const
inline

Lexicographically compares two strings.

Parameters
const BASE& a
String to be compared to own data.
Returns
True if not equal, false if equal.
bool PLCI::CString::operator< ( const BASE & a ) const
inline

Lexicographically compares two strings.

Parameters
const BASE& a
Returns
True if const BASE& a is less than own data and false if not.
void PLCI::CString::operator= ( const char * p )
inline

Assigns values to the string.

Parameters
const char* p
character string, the string will be replaced with
Returns
none
bool PLCI::CString::operator== ( const char * p2 ) const
inline

Lexicographically compares two strings.

Parameters
const char* p2
Const char to be compared with own data.
Returns
True if equal, false if not equal.
bool PLCI::CString::operator== ( const BASE & a ) const
inline

Lexicographically compares two strings.

Parameters
const BASE& a
String to be compared to own data.
Returns
True if equal and false if not equal


PLCI: PLCI Metaelement class

Classes
PLCI Metaelement class

Description of a parsed meta element. More...

Classes

class PLCI::MetaElement
Class to store the information of an meta element parsed from the metabin.img of the PLC. More...

Detailed Description

Description of a parsed meta element.


PLCI: PLCI::MetaElement Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • MetaElement
Public Member Functions | List of all members
PLCI::MetaElement Class Reference
PLCI Metaelement class

Class to store the information of an meta element parsed from the metabin.img of the PLC. More...

Public Member Functions

CString GetInstancePath ()
Create and return the instance path of the active element. More...
MetaElementType GetDataType ()
Method to get the data type of the element. More...
MetaElement * GetParent ()
Get the pointer to the parent chained to the element. More...
MetaElement * GetChild ()
Get the pointer to the child chained to the element. More...
MetaElement * GetNextElement ()
Get the pointer to the next element chained to the element. More...
MetaElement * GetPreviousElement ()
Get the pointer to the previous element chained to the element. More...
CString GetName ()
Returns the name of the element. More...
unsigned int | GetFieldAmount ()
Get the amount of elements. More...
unsigned int | GetInstancePathDepth ()
Returns level of element in the chain. More...
CString GetTypeName ()
Returns type name of the element. More...
int | GetBitPosition ()
Returns the bit position if element is of type Bitfield. More...
CString GetArrayTypeName ()
Returns the type of the array. More...
unsigned int | GetDataSize ()
Returns the data size/ array length. More...
unsigned int | GetUpperBound ()
Returns the upper bound index of an array. More...
unsigned int | GetLowerBound ()
Returns the lower bound index of an array. More...
bool | IsTask ()
Check if element is a task. More...
bool | IsProgram ()
Check if element is a program. More...
bool | IsElementary ()
Check if element is an elementary. More...
bool | IsResource ()
Check if element is a resource. More...
bool | IsArray ()
Check if element is an array. More...
bool | IsStruct ()
Check if element is a struct. More...
bool | IsString ()
Check if element is a struct. More...
bool | IsValueType ()
Check if element is of type Valuetype. More...
bool | IsOPC ()
Check if element is of type OPC. More...

Detailed Description

Class to store the information of an meta element parsed from the metabin.img of the PLC.

The methods to set specific informations of the element are set by the parser it self and should not be called by the user.

Member Function Documentation

CString PLCI::MetaElement::GetArrayTypeName ( )
inline

Returns the type of the array.

Returns
CString
int PLCI::MetaElement::GetBitPosition ( )
inline

Returns the bit position if element is of type Bitfield.

Returns
int
MetaElement* PLCI::MetaElement::GetChild ( )
inline

Get the pointer to the child chained to the element.

Returns
MetaElement*
unsigned int PLCI::MetaElement::GetDataSize ( )
inline

Returns the data size/ array length.

Returns
unsigned int
MetaElementType PLCI::MetaElement::GetDataType ( )
inline

Method to get the data type of the element.

Parameters
none
Returns
MetaElementType
unsigned int PLCI::MetaElement::GetFieldAmount ( )
inline

Get the amount of elements.

Returns
unsigned int
CString PLCI::MetaElement::GetInstancePath ( )

Create and return the instance path of the active element.

Parameters
none
Returns
CString
unsigned int PLCI::MetaElement::GetInstancePathDepth ( )
inline

Returns level of element in the chain.

Returns
unsigned int
unsigned int PLCI::MetaElement::GetLowerBound ( )
inline

Returns the lower bound index of an array.

Returns
unsigned int
CString PLCI::MetaElement::GetName ( )
inline

Returns the name of the element.

Returns
CString
MetaElement* PLCI::MetaElement::GetNextElement ( )
inline

Get the pointer to the next element chained to the element.

Returns
MetaElement*
MetaElement* PLCI::MetaElement::GetParent ( )
inline

Get the pointer to the parent chained to the element.

Returns
MetaElement*
MetaElement* PLCI::MetaElement::GetPreviousElement ( )
inline

Get the pointer to the previous element chained to the element.

Returns
MetaElement*
CString PLCI::MetaElement::GetTypeName ( )
inline

Returns type name of the element.

Returns
CString
unsigned int PLCI::MetaElement::GetUpperBound ( )
inline

Returns the upper bound index of an array.

Returns
unsigned int
bool PLCI::MetaElement::IsArray ( )
inline

Check if element is an array.

Returns
bool: true or false
bool PLCI::MetaElement::IsElementary ( )
inline

Check if element is an elementary.

Returns
bool: true or false
bool PLCI::MetaElement::IsOPC ( )
inline

Check if element is of type OPC.

Returns
bool: true or false
bool PLCI::MetaElement::IsProgram ( )
inline

Check if element is a program.

Returns
bool: true or false
bool PLCI::MetaElement::IsResource ( )
inline

Check if element is a resource.

Returns
bool: true or false
bool PLCI::MetaElement::IsString ( )
inline

Check if element is a struct.

Returns
bool: true or false
bool PLCI::MetaElement::IsStruct ( )
inline

Check if element is a struct.

Returns
bool: true or false
bool PLCI::MetaElement::IsTask ( )
inline

Check if element is a task.

Returns
bool: true or false
bool PLCI::MetaElement::IsValueType ( )
inline

Check if element is of type Valuetype.

Returns
bool: true or false


PLCI: Communication class

Classes
Communication class

Main functions to establish a connection and to get a service for that connection. More...

Classes

class PLCI::CPlci
Included in this class are methods to connect and disconnect from PLC and an method to get a service from the connected PLC.
The services are always connection specific. More...

Detailed Description

Main functions to establish a connection and to get a service for that connection.


PLCI: PLCI::CPlci Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CPlci
Public Member Functions | List of all members
PLCI::CPlci Class Reference
Communication class

Included in this class are methods to connect and disconnect from PLC and an method to get a service from the connected PLC.
The services are always connection specific. More...

Public Member Functions

CPlci ()
CPlci() is the constructor of the main PLCI class. An instance is needed for every connection to a PLC.
void | Connect (CString Adress, unsigned short uPort, unsigned short uTimeout)
Connect is used to connect to a PLC via TCP/IP with the specific Parameters.
. More...
void | Connect (CString ConnectionString)
Connect is used to connect to a PLC via communication protocol with the specific Parameters defined as a connection string. More...
void | Disconnect ()
Function to disconnect from PLC.
The remoting object is deleted and all allocated memory for the connection are freed.
. More...
template<class T >
T * | GetService ()
GetService is the main method to get an instance of a service, e.g. CDeviceAttributeService or DataAccessService.
The method requires a service as template parameter. The service is only valid as long as the connection is valid. After reconnect a new service request must be send. More...

Detailed Description

Included in this class are methods to connect and disconnect from PLC and an method to get a service from the connected PLC.
The services are always connection specific.

Member Function Documentation

void PLCI::CPlci::Connect | ( | CString | Adress,
 |  | unsigned short | uPort,
 |  | unsigned short | uTimeout
 | ) |  |

Connect is used to connect to a PLC via TCP/IP with the specific Parameters.
.

Parameters
CStrig Adress
IP Adress of communication partner
unsigned short uPort
TCP/IP Port for connection. Default port is 41100.
unsigned short uTimeout
Timeout in ms for send and recv. Default timeout is 2000ms.
Exceptions
PlciError_OutOfMemory CBadAllocException
PlciError_Can_not_establish_connection CFatalException
void PLCI::CPlci::Connect ( CString ConnectionString )

Connect is used to connect to a PLC via communication protocol with the specific Parameters defined as a connection string.

Parameters
CString ConnectionString.
Connection string which stored all necessary information to connect to PLC via e.g. Serial/USB/...
Returns
void PLCI::CPlci::Disconnect ( )

Function to disconnect from PLC.
The remoting object is deleted and all allocated memory for the connection are freed.
.

Parameters
none
Returns
none
template<class T >
T* PLCI::CPlci::GetService ( )
inline

GetService is the main method to get an instance of a service, e.g. CDeviceAttributeService or DataAccessService.
The method requires a service as template parameter. The service is only valid as long as the connection is valid. After reconnect a new service request must be send.

Parameters
T
Service name is used as parameter.
Returns
Pointer from type T. T is the placeholder for the service.


PLCI: Device attribute service

Classes
Device attribute service

Get and Set PLC specific attributes. More...

Classes

class PLCI::CDeviceAttributeService
Class has implementation of all necessary functions for the device attribute service. More...

Detailed Description

Get and Set PLC specific attributes.


PLCI: PLCI::CDeviceAttributeService Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CDeviceAttributeService
Public Member Functions | List of all members
PLCI::CDeviceAttributeService Class Reference
Device attribute service

Class has implementation of all necessary functions for the device attribute service. More...

Public Member Functions

CDeviceAttributeService (PLCI_internal::CRemoting *pRemoting, CPlci *pPLci)
DeviceAttributeService is the constructor for the service which is called in the context of the PLCI::GetService() function of the PLCI class.
This function communicates with the PLC and requests the service if available, otherwise no pointer to this class is retruned by PLCI::GetService().
This class must not be constructed by the user. More...
void | GetAttribute (signed short int attributeId, CObject &value)
Gets the specified attribute of the device. More...
void | GetAttributes (const CWrapArray< signed short int > &attributes, CArray< CObject > &values)
Gets the device attributes. More...
void | SetAttribute (signed short int attributeId, const CObject &value)
Writes the specified attribute to the device. More...
void | SetAttributes (const CWrapArray< signed short int > &attributes, const CWrapArray< CObject > &values)
Writes the specified attributes to the device. More...

Detailed Description

Class has implementation of all necessary functions for the device attribute service.

Constructor & Destructor Documentation

PLCI::CDeviceAttributeService::CDeviceAttributeService | ( | PLCI_internal::CRemoting * | pRemoting,
 |  | CPlci * | pPLci
 | ) |  |

DeviceAttributeService is the constructor for the service which is called in the context of the PLCI::GetService() function of the PLCI class.
This function communicates with the PLC and requests the service if available, otherwise no pointer to this class is retruned by PLCI::GetService().
This class must not be constructed by the user.

Parameters
CRemoting* pRemoting
Remoting object from the established connection.
Returns
none
Exceptions
PlciError_CommunicationBufferOverflow CFatalException
PlciError_Illegal_header CRecoverableException
PlciError_PlcError CRecoverableException

Member Function Documentation

void PLCI::CDeviceAttributeService::GetAttribute | ( | signed short int | attributeId,
 |  | CObject & | value
 | ) |  |

Gets the specified attribute of the device.

Parameters
signed short int attributeId
Id for the requested attribute StandardDeviceAttributes.
unsigned short invokeId
Identification number for the service request.
Returns
CObject& value
Returned value of the requested attribute. Can be NULL if the attribute is not supported by the server.
Exceptions
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException
void PLCI::CDeviceAttributeService::GetAttributes | ( | const CWrapArray< signed short int > & | attributes,
 |  | CArray< CObject > & | values
 | ) |  |

Gets the device attributes.

Parameters
CWrapArray<signed short int>& attributes
Ids for the requested attributes.
unsigned short invokeId
Identification number for the service request.
Returns
CArray<rm::CObject>& values
Returned values of the requested attributes. Can be NULL if the attribute is not supported by the server.
Exceptions
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException
void PLCI::CDeviceAttributeService::SetAttribute | ( | signed short int | attributeId,
 |  | const CObject & | value
 | ) |  |

Writes the specified attribute to the device.

Parameters
signed short int attributeId
The attribute id
CObject& value The value to be written.
unsigned short invokeId
Identification number for the service request.
Returns
none
Exceptions
PlciError_CommunicationBufferOverflow CFatalException
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException
void PLCI::CDeviceAttributeService::SetAttributes | ( | const CWrapArray< signed short int > & | attributes,
 |  | const CWrapArray< CObject > & | values
 | ) |  |

Writes the specified attributes to the device.

Parameters
CWrapArray<signed short int >& attributes
The attribute ids
CWrapArray<rm::CObject>& values
The values to be written.
unsigned short invokeId
Identification number for the service request.
Returns
none
Exceptions
PlciError_CommunicationBufferOverflow CFatalException
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException


PLCI: Data access service

Classes
Data access service

Read data from PLC and write data to PLC. More...

Classes

class | PLCI::CDataAccessVariableList
Implementation of variable list helper class for the data access service.
This class must not be constructed by the user. More...
class | PLCI::CDataAccessSubscription
Implementation of subscription helper class for the data access service.
This class must not be constructed by the user. More...
class | PLCI::CDataAccessService
Class has implementation of all necessary functions for the data access service.
This class must not be constructed by the user. More...

Detailed Description

Read data from PLC and write data to PLC.


PLCI: PLCI::CDataAccessVariableList Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CDataAccessVariableList
Public Member Functions | List of all members
PLCI::CDataAccessVariableList Class Reference
Data access service

Implementation of variable list helper class for the data access service.
This class must not be constructed by the user. More...

Public Member Functions

UInt32 | GetVariableAmount ()
Get the amount of variables added to the DataAccessVariableList. More...
void | Destroy ()
Delete this
It is used to free the object.
After calling Destroy() the object is no longer valid and all referenced pointer have to be nulled. More...
void | AddVariable (CString InstancePath)
Add variable name to token list Instance path to a variable is added to the token list for the data access service.
. More...

Detailed Description

Implementation of variable list helper class for the data access service.
This class must not be constructed by the user.

A object of this class is only generated by the DataAccessService class.

Member Function Documentation

void PLCI::CDataAccessVariableList::AddVariable ( CString InstancePath )

Add variable name to token list Instance path to a variable is added to the token list for the data access service.
.

Parameters
CString InstancePath
Instance path example for global variable: "@GlobalVariables.Variable1" Instance path example for local variable: "Ressource.Task.Program.Variable"
Returns
none
Exceptions
CBadAllocException
PlciError_NotImplemented CFatalException
void PLCI::CDataAccessVariableList::Destroy ( )

Delete this
It is used to free the object.
After calling Destroy() the object is no longer valid and all referenced pointer have to be nulled.

Parameters
none
Returns
none
UInt32 PLCI::CDataAccessVariableList::GetVariableAmount ( )

Get the amount of variables added to the DataAccessVariableList.

Parameters
none
Returns
unsigned int
The amount of variables


PLCI: PLCI::CDataAccessSubscription Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CDataAccessSubscription
Public Member Functions | List of all members
PLCI::CDataAccessSubscription Class Reference
Data access service

Implementation of subscription helper class for the data access service.
This class must not be constructed by the user. More...

Public Member Functions

void | Destroy ()
Delete this
It is used to free the object.
The registered subscription is unregistered at the PLC and not longer valid. After calling Destroy() the object is no longer valid and all referncing pointer have to be nulled. More...
void | GetResponse (CArray< CObject > &Values)
Get response
The data from the activated and valid subscription is gathered and returned by this function. More...

Detailed Description

Implementation of subscription helper class for the data access service.
This class must not be constructed by the user.

A object of this class is only generated by the DataAccessService class.

Member Function Documentation

void PLCI::CDataAccessSubscription::Destroy ( )

Delete this
It is used to free the object.
The registered subscription is unregistered at the PLC and not longer valid. After calling Destroy() the object is no longer valid and all referncing pointer have to be nulled.

Parameters
none
Returns
none
void PLCI::CDataAccessSubscription::GetResponse ( CArray< CObject > & Values )

Get response
The data from the activated and valid subscription is gathered and returned by this function.

Parameters
none
Returns
CArray<CObject>
Array of object hold the data for each variable subscribed.
Exceptions
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException


PLCI: PLCI::CDataAccessService Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CDataAccessService
Public Member Functions | List of all members
PLCI::CDataAccessService Class Reference
Data access service

Class has implementation of all necessary functions for the data access service.
This class must not be constructed by the user. More...

Public Member Functions

CDataAccessService (PLCI_internal::CRemoting *pRemoting, CPlci *pPLci)
Constructor of the DataAccessService. More...
void | ReadVariables (CDataAccessVariableList *VariableList, CArray< CObject > &Values)
Read list of Variables
A list of variables can be read from the PLC. More...
void | WriteVariables (CDataAccessVariableList *VariableList, CArray< CObject > &Values)
Write list of variables Variables on the PLC can be written. More...
CDataAccessSubscription * | CreateSubscription (CDataAccessVariableList *VariableList)
create subscription Subscribe an amount of variables to the PLC for later use. The subscription is allocated and activated at the PLC. More...
CDataAccessVariableList * CreateVarList ()
Create Variable list object. More...

Detailed Description

Class has implementation of all necessary functions for the data access service.
This class must not be constructed by the user.

Constructor & Destructor Documentation

PLCI::CDataAccessService::CDataAccessService | ( | PLCI_internal::CRemoting * | pRemoting,
 |  | CPlci * | pPLci
 | ) |  |

Constructor of the DataAccessService.

Parameters
CRemoting* pRemoting
Remoting object from the established connection.
Returns
none

Member Function Documentation

CDataAccessSubscription* PLCI::CDataAccessService::CreateSubscription ( CDataAccessVariableList * VariableList )

create subscription Subscribe an amount of variables to the PLC for later use. The subscription is allocated and activated at the PLC.

Parameters
DataAccessVariableList*
the list of variables to be written.
Returns
DataAccessSubscription*
A pointer to the subscription object is returned
Exceptions
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException
CDataAccessVariableList* PLCI::CDataAccessService::CreateVarList ( )

Create Variable list object.

Parameters
none
Returns
DataAccessVariableList*
A pointer to the variable list object is returned.
Exceptions
CBadAllocException
void PLCI::CDataAccessService::ReadVariables | ( | CDataAccessVariableList * | VariableList,
 |  | CArray< CObject > & | Values
 | ) |  |

Read list of Variables
A list of variables can be read from the PLC.

Parameters
DataAccessVariableList*
the list of variables to be read.
CArray<CObject>&
The read values are stored in the array of objects.
Returns
none
Exceptions
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException
void PLCI::CDataAccessService::WriteVariables | ( | CDataAccessVariableList * | VariableList,
 |  | CArray< CObject > & | Values
 | ) |  |

Write list of variables Variables on the PLC can be written.

Parameters
DataAccessVariableList*
the list of variables to be written.
CArray<CObject>&
the values to be written.
Returns

Exceptions
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException


PLCI: PLC control service

Classes
PLC control service

Service to control the PLC, for example Stop/Start. More...

Classes

class PLCI::CPlcControlService
Class has implementation of all necessary functions for the plc control service. More...

Detailed Description

Service to control the PLC, for example Stop/Start.


PLCI: PLCI::CPlcControlService Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CPlcControlService
Public Member Functions | List of all members
PLCI::CPlcControlService Class Reference
PLC control service

Class has implementation of all necessary functions for the plc control service. More...

Public Member Functions

CPlcControlService (PLCI_internal::CRemoting *pRemoting, CPlci *pPLci)
CPlcControlService is the constructor for the service which is called in the context of the PLCI::GetService() function of the PLCI class.
This function communicates with the PLC and requests the service if available, otherwise no pointer to this class is retruned by PLCI::GetService().
This class must not be constructed by the user. More...
void | ActivateBootProject ()
Active boot project on connected PLC. More...
void | DeleteBootProject ()
Delete the boot project from the file device of the connected PLC. More...
void | Reset ()
Reset the project on the connected PLC.
. More...
void | StartPlc (StartMode mode)
Start the connected PLC if project is available on the connected PLC. More...
void | StopPlc ()
Stop the connected PLC if the state is running. Test. More...

Detailed Description

Class has implementation of all necessary functions for the plc control service.

Constructor & Destructor Documentation

PLCI::CPlcControlService::CPlcControlService | ( | PLCI_internal::CRemoting * | pRemoting,
 |  | CPlci * | pPLci
 | ) |  |

CPlcControlService is the constructor for the service which is called in the context of the PLCI::GetService() function of the PLCI class.
This function communicates with the PLC and requests the service if available, otherwise no pointer to this class is retruned by PLCI::GetService().
This class must not be constructed by the user.

Parameters
CRemoting* pRemoting
Remoting object from the established connection.
Returns
none
Exceptions
PlciError_CommunicationBufferOverflow CFatalException
PlciError_Illegal_header CRecoverableException
PlciError_PlcError CRecoverableException

Member Function Documentation

void PLCI::CPlcControlService::ActivateBootProject ( )

Active boot project on connected PLC.

Parameters
none
Returns
none
Exceptions
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException
void PLCI::CPlcControlService::DeleteBootProject ( )

Delete the boot project from the file device of the connected PLC.

Parameters
none
Returns
none
Exceptions
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException
void PLCI::CPlcControlService::Reset ( )

Reset the project on the connected PLC.
.

To reset the PLC the state of the PLC needs to be Stop.
Reset unloads the application, the PLC is in state On after a reset.

Parameters
none
Returns
none
Exceptions
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException
void PLCI::CPlcControlService::StartPlc ( StartMode mode )

Start the connected PLC if project is available on the connected PLC.

Parameters
Startmode
Returns
none
Exceptions
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException
void PLCI::CPlcControlService::StopPlc ( )

Stop the connected PLC if the state is running. Test.

Parameters
none
Returns
none
Exceptions
PlciError_Write_timeout CFatalException
PlciError_Confirmation_is_not_valid CRecoverableException
PlciError_PlcError CRecoverableException


PLCI: File service

Classes
File service

Service for file device operations. More...

Classes

class PLCI::CFileService
Class has implementation of all necessary functions for the file service. More...

Detailed Description

Service for file device operations.


PLCI: PLCI::CFileService Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CFileService
Public Member Functions | List of all members
PLCI::CFileService Class Reference
File service

Class has implementation of all necessary functions for the file service. More...

Public Member Functions

CFileService (PLCI_internal::CRemoting *pRemoting, CPlci *pPLci)
CFileService is the constructor for the service which is called in the context of the PLCI::GetService() function of the PLCI class.
This function communicates with the PLC and requests the service if available, otherwise no pointer to this class is retruned by PLCI::GetService().
This class must not be constructed by the user. More...
unsigned int | GetTransferPaketSize ()
Get the maximum size of Bytes for one packet for writing a file. More...
Int32 | OpenWrite (const char *FileName)
Open file to write to. More...
void | Write (Int32 lFileHandle, CArray< Byte > Data)
Write to an previous opened file. More...
void | Close (Int32 lFileHandle)
Close open file. More...
void | RemoveFile (const char *FileName)
Deletes a file specified by parameter. More...
Int32 | OpenRead (const char *FileName)
Open file to read from. More...
bool | Read (Int32 lFileHandle, CArray< Byte > &Data, Int32 lLengthToRead)
Read specified amount of data from file. More...

Detailed Description

Class has implementation of all necessary functions for the file service.

Constructor & Destructor Documentation

PLCI::CFileService::CFileService | ( | PLCI_internal::CRemoting * | pRemoting,
 |  | CPlci * | pPLci
 | ) |  |

CFileService is the constructor for the service which is called in the context of the PLCI::GetService() function of the PLCI class.
This function communicates with the PLC and requests the service if available, otherwise no pointer to this class is retruned by PLCI::GetService().
This class must not be constructed by the user.

Parameters
CRemoting* pRemoting
Remoting object from the established connection.
Returns
none
Exceptions
PlciError_CommunicationBufferOverflow CFatalException
PlciError_Illegal_header CRecoverableException
PlciError_PlcError CRecoverableException

Member Function Documentation

void PLCI::CFileService::Close ( Int32 lFileHandle )

Close open file.

Parameters
Int32 lFileHandle File handle.
Returns
none
Exceptions
PlciError_CommunicationBufferOverflow CFatalException
PlciError_Illegal_header CRecoverableException
PlciError_PlcError CRecoverableException
FileError
unsigned int PLCI::CFileService::GetTransferPaketSize ( )

Get the maximum size of Bytes for one packet for writing a file.

Parameters
none
Returns
amount of bytes as unsigned int
Int32 PLCI::CFileService::OpenRead ( const char * FileName )

Open file to read from.

Parameters
const char* FileName File name
Returns
File handle as an Int32
Exceptions
PlciError_CommunicationBufferOverflow CFatalException
PlciError_Illegal_header CRecoverableException
PlciError_PlcError CRecoverableException
FileError
Int32 PLCI::CFileService::OpenWrite ( const char * FileName )

Open file to write to.

Parameters
Filename
Returns
File handle as an Int32
Exceptions
PlciError_CommunicationBufferOverflow CFatalException
PlciError_Illegal_header CRecoverableException
PlciError_PlcError CRecoverableException
FileError
bool PLCI::CFileService::Read | ( | Int32 | lFileHandle,
 |  | CArray< Byte > & | Data,
 |  | Int32 | lLengthToRead
 | ) |  |

Read specified amount of data from file.

Parameters
Int32 | lFileHandle File handle to identify file.
CArray<Byte> | &Data Byte Array to read to.
Int32 | lLengthToRead Amount of data to be read
Returns
true if data is read, false if no data is read.
Exceptions
PlciError_CommunicationBufferOverflow CFatalException
PlciError_Illegal_header CRecoverableException
PlciError_PlcError CRecoverableException
FileError
void PLCI::CFileService::RemoveFile ( const char * FileName )

Deletes a file specified by parameter.

Parameters
const char* FileName File name
Returns
none
Exceptions
PlciError_CommunicationBufferOverflow CFatalException
PlciError_Illegal_header CRecoverableException
PlciError_PlcError CRecoverableException
CommErrors_InvalidCommand
FileError
void PLCI::CFileService::Write | ( | Int32 | lFileHandle,
 |  | CArray< Byte > | Data
 | ) |  |

Write to an previous opened file.

Parameters
Int32 | lFileHandle Handle to identify previous opened file.
CArray<Byte> | Data Byte array with data to be written to file.
Returns
none
Exceptions
PlciError_CommunicationBufferOverflow CFatalException
PlciError_Illegal_header CRecoverableException
PlciError_PlcError CRecoverableException
FileError


PLCI: PLCI Meta data parser

Classes
PLCI Meta data parser

Main functions to get a list of accessible Variables to use for DataAccessService. More...

Classes

class PLCI::CMetaDataParser
Class has implementation of all necessary functions to browse the meta data. More...

Detailed Description

Main functions to get a list of accessible Variables to use for DataAccessService.


PLCI: PLCI::CMetaDataParser Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CMetaDataParser
Public Member Functions | List of all members
PLCI::CMetaDataParser Class Reference
PLCI Meta data parser

Class has implementation of all necessary functions to browse the meta data. More...

Public Member Functions

CMetaDataParser ()
CMetaDataParser is the constructor of the PLCI meta API. More...
~CMetaDataParser ()
Destructor of the PLCI meta API is used to connect to a PLC via TCP/IP with the specific Parameters. More...
void Init (CArray< Byte > Data)
Method to generate a list of accessible variables. More...
MetaElement * GetMetaRoot ()
Method returns the list generated with Init. More...

Detailed Description

Class has implementation of all necessary functions to browse the meta data.

Constructor & Destructor Documentation

PLCI::CMetaDataParser::CMetaDataParser ( )

CMetaDataParser is the constructor of the PLCI meta API.

Parameters
None
PLCI::CMetaDataParser::~CMetaDataParser ( )

Destructor of the PLCI meta API is used to connect to a PLC via TCP/IP with the specific Parameters.

Parameters
None

Member Function Documentation

MetaElement* PLCI::CMetaDataParser::GetMetaRoot ( )

Method returns the list generated with Init.

Parameters
MetaList ListToReturn
Returns
MetaElement*
Exceptions
PlciError_OutOfMemory CBadAllocException
void PLCI::CMetaDataParser::Init ( CArray< Byte > Data )

Method to generate a list of accessible variables.

Parameters
CArray<Byte> | Data Array of Bytes, which holds the meta data file. Taken from the PLC or from an other source.
MetaList | SearchFor can be set to only get local or global or all variables
Exceptions
PlciError_OutOfMemory CBadAllocException


PLCI: Namespace List

  • Namespace List
  • Namespace Members
Namespace List
Here is a list of all documented namespaces with brief descriptions:
N PLCI


PLCI: PLCI Namespace Reference

  • Namespace List
  • Namespace Members
Classes | Typedefs | Enumerations | Functions
PLCI Namespace Reference

Classes

class | CArray
Array implementation.
. More...
class | CBadAllocException
Error thrown in case the system runs out of memory. More...
class | CBaseString
Base string implementation.
. More...
class | CDataAccessService
Class has implementation of all necessary functions for the data access service.
This class must not be constructed by the user. More...
class | CDataAccessSubscription
Implementation of subscription helper class for the data access service.
This class must not be constructed by the user. More...
class | CDataAccessVariableList
Implementation of variable list helper class for the data access service.
This class must not be constructed by the user. More...
class | CDeviceAttributeService
Class has implementation of all necessary functions for the device attribute service. More...
class | CException
Base exception class. More...
class | CFatalException
Class to signal fatal errors.
This object is thrown as an exception. Members signal the type of error and show, that it is a fatal error (error_fatal).
The exception holds the information which PLCI error is occurred and in case a there is additional information the second member is of type: StandardCommunicationErrors. More...
class | CFileService
Class has implementation of all necessary functions for the file service. More...
class | CMetaDataParser
Class has implementation of all necessary functions to browse the meta data. More...
class | CObject
This class encapsulates typed values that are send to and received from the device. They are used e.g. for the device attributes in the Device Attribute Service and for the online values in the Data Access Service. Instances of the this class can hold a value of an elementary data type or an array of such values.Additionally the type information is stored.There are overloaded methods to get and set the value of different types. More...
class | CPlcControlService
Class has implementation of all necessary functions for the plc control service. More...
class | CPlci
Included in this class are methods to connect and disconnect from PLC and an method to get a service from the connected PLC.
The services are always connection specific. More...
class | CRecoverableException
Class to signal recoverable errors.
This object is thrown as an exception. Members signal the type of error and show, that it is a recoverable error (error_Recoverable).
The exception holds the information which PLCI error is occurred and in case a there is additional information the second member is of type: StandardCommunicationErrors or of type FileError. More...
class | CString
String implementation for Ansi encoding.
. More...
class | CString16
String16 implementation
. More...
class | CWrapArray
Array that cannot allocate memory by it self. If an CArray is build and filled, it can be changed into an wrapped array with fixed size.
Parts can be modified but no new element can be allocated. The function to wrap an array is wrap( const T* p, unsigned uCount ).
It is an template class and can be used for all type of arrays supported by the PLCI. More...
class | MetaElement
Class to store the information of an meta element parsed from the metabin.img of the PLC. More...
class | TString
Template implementation of methods used by Ansi or Utf16 strings.
. More...

Typedefs

typedef enum
PLCI::_StandardCommunicationErrors 		StandardCommunicationErrors
Standard exception enum.
typedef enum
PLCI::StandardDeviceAttributes 		StandardDeviceAttributes
Device attributes, that can be obtained from PLC.
typedef enum PLCI::PlcState PlcState
PLC state can be obtained by using the device attribute service with the attribute StandardDeviceAttributes_PlcState.

Enumerations

enum PlciError {
PlciError_OK = 0, PlciError_InvalidArgument, PlciError_PlcError, PlciError_CommunicationBufferOverflow,
_PlciError_LAST, _PlciError_FATAL_BEGIN = 255, PlciError_Fatal, PlciError_Recoverable,
PlciError_Connect_Invalid_Socket, PlciError_Socket_in_use, PlciError_Reader_timeout, PlciError_Write_timeout,
PlciError_Confirmation_is_not_valid, PlciError_InvalidType, PlciError_OutOfRange, PlciError_OutOfMemory,
PlciError_Array_to_big, PlciError_Fatal_error_remoting_object_is_null, PlciError_Can_not_establish_connection, PlciError_Illegal_header,
PlciError_Remoting_nullpointer_exception, PlciError_Service_not_valid, PlciError_Exception, PlciError_Parameter_not_usable_for_service,
PlciError_NotImplemented, PlciError_FileError, PlciError_MetaDataEmpty, PlciError_Subscription_Invalid,
_PlciError_FATAL_END
}
PlciError enum. More...
enum FileError {
FileError_NoError = 0, FileError_DiskFull, FileError_WriteProtection, FileError_FileNotFound,
FileError_DeviceNotFound, FileError_FileOpened, FileError_MethodFailed, FileError_WrongHandle,
FileError_WrongSequence, FileError_OnlyOneFileAtSameTimeAllowed
}
FileError enum. More...
enum _StandardCommunicationErrors { ,
CommErrors_InvalidProtocolVersion = 0x40000001, CommErrors_UnknownServiceHandle = 0x40000002, CommErrors_UnknownMethodHandle = 0x40000003, CommErrors_InvalidCommand = 0x40000004,
CommErrors_InputStreamEmpty = 0x40000005, CommErrors_HeaderXsumError = 0x40000006, CommErrors_OutOfMemory = 0x20000001, CommErrors_InvalidHandle = 0x20000002,
CommErrors_NoProgramOnTheDevice = 0x20000006, CommErrors_OtherMasterActive = 0x20000005, CommErrors_ExecutionError = 0x20000007, CommErrors_ReadOnly = 0x20000008,
CommErrors_InvalidPlcState = 0x20000009, CommErrors_RecvTimeout = 0x40001001, CommErrors_RecvFailed = 0x40001002, CommErrors_SendTimeout = 0x40001003,
CommErrors_SendFailed = 0x40001004, CommErrors_UnknownObjectFormat = 0x40001005 , CommErrors_CannotReadVariableValues = 0x3, CommErrors_CannotWriteVariableValues = 0x4,
CommErrors_CannotCreateVariableGroup = 0x5, CommErrors_CannotAccessPlcData = 0x6
}
Standard exception enum. More...
enum StandardDeviceAttributes {
StandardDeviceAttributes_Manufacturer = 0x0, StandardDeviceAttributes_ProductName = 0x1, StandardDeviceAttributes_HardwareVersion = 0x3, StandardDeviceAttributes_FirmwareVersion = 0x4,
StandardDeviceAttributes_EClrMaxApplicationDataSize = 0x5, StandardDeviceAttributes_EClrMaxApplicationRetainDataSize = 0x6, StandardDeviceAttributes_EClrMaxApplicationProgramSize = 0x7, StandardDeviceAttributes_EClrMaxRuntimeHeapSize = 0x9,
StandardDeviceAttributes_EClrRuntimeVersion = 0xB, StandardDeviceAttributes_EClrThreadingPriorityLevel = 0xF, StandardDeviceAttributes_EClrFreeApplicationDataSize = 0x4000, StandardDeviceAttributes_EClrFreeApplicationProgramSize = 0x4001,
StandardDeviceAttributes_SourceOnPlc = 0x4003, StandardDeviceAttributes_EClrFreeRetainDataSize = 0x4005, StandardDeviceAttributes_Identity = 0x4006, StandardDeviceAttributes_ImageOnPlc = 0x4008,
StandardDeviceAttributes_EClrMetaCRC = 0x400B, StandardDeviceAttributes_EClrImageTime = 0x400D, StandardDeviceAttributes_EClrBootProjName = 0x400E, StandardDeviceAttributes_PlcState = 0x4E19
}
Device attributes, that can be obtained from PLC. More...
enum PlcState {
PlcOn = 0, PlcLoading = 1, PlcStarting = 2, PlcRunning = 3,
PlcHaltRequested = 4, PlcHalt = 5, PlcStopping = 6, PlcStop = 7,
PlcResetting = 8
}
PLC state can be obtained by using the device attribute service with the attribute StandardDeviceAttributes_PlcState. More...
enum MetaElementType : unsigned char {
TypeUnknown = 0x00, TypeNull = TypeUnknown, TypeVoid = 0x01, TypeBool = 0x02,
TypeChar = 0x03, TypeInt8 = 0x04, TypeUint8 = 0x05, TypeInt16 = 0x06,
TypeUint16 = 0x07, TypeInt32 = 0x08, TypeUint32 = 0x09, TypeInt64 = 0x0a,
TypeUint64 = 0x0b, TypeReal32 = 0x0c, TypeReal64 = 0x0d, TypeString = 0x0e,
TypePtr = 0x0f, TypeValueType = 0x11, TypeClass = 0x12, TypeArray = 0x14 ,
TypeObject = 0x1c
}
Definition of meta element types used by remoting of PLC.
not allowed to change, only to have an overview. Not all types are described. More...

Functions

template<class T >
CWrapArray< T > wrap (const T *p, unsigned uCount)
Helper function to convert an CArray to a CWrapArray. More...

Detailed Description

namespace PLCI

Enumeration Type Documentation

enum PLCI::_StandardCommunicationErrors

Standard exception enum.

Enumerator
CommErrors_InvalidProtocolVersion | Version of the remoting protocol received does not fit to the active protocol on the PLC.
CommErrors_UnknownServiceHandle | Service handle is not known by the PLC.
CommErrors_UnknownMethodHandle | Method called is not valid.
CommErrors_InvalidCommand | The command called is not known on PLC.
CommErrors_InputStreamEmpty | The received stream is empty.
CommErrors_HeaderXsumError | Checksum is corrupted.
CommErrors_OutOfMemory | No memory left on device for PLC.
CommErrors_InvalidHandle | Invalid handle received.
CommErrors_NoProgramOnTheDevice | There is no program downloaded to the PLC.
CommErrors_OtherMasterActive | Another master is active, the requested operation can not be executed.
CommErrors_ExecutionError | Error while executing or trying to execute the program.
CommErrors_ReadOnly | Tried to write to an "readonly" object.
CommErrors_InvalidPlcState | The PLC is an in valid state to perform this operation.
CommErrors_RecvTimeout | Timeout during receive.
CommErrors_RecvFailed | Failed to receive data.
CommErrors_SendTimeout | Timeout during send.
CommErrors_SendFailed | Failed to send data.
CommErrors_UnknownObjectFormat | Object format arrived is not known or not supported by service.
CommErrors_CannotReadVariableValues | Values could not be read.
CommErrors_CannotWriteVariableValues | Values could not be written.
CommErrors_CannotCreateVariableGroup | Group of variables could not be created.
CommErrors_CannotAccessPlcData | Can't access PLC data.
enum PLCI::FileError

FileError enum.

Enumerator
FileError_NoError | No error, standard value.
FileError_DiskFull | No space left on file device.
FileError_WriteProtection | File is write protected.
FileError_FileNotFound | File trying to access is not found.
FileError_DeviceNotFound | No device to use for file methods.
FileError_FileOpened | Opening file failed.
FileError_MethodFailed | Method used is not implemented in the PLC.
FileError_WrongHandle | Wrong handle used for method.
FileError_WrongSequence | Methods called in wrong order.
FileError_OnlyOneFileAtSameTimeAllowed | With older PLCs it is only allowed to read one file at same time.
enum PLCI::MetaElementType : unsigned char

Definition of meta element types used by remoting of PLC.
not allowed to change, only to have an overview. Not all types are described.

Enumerator
TypeUnknown | Unknown type.
TypeNull | Unknown type.
TypeVoid | Void type, returned if object is not valid at eCLR.
TypeBool | Bool.
TypeChar | Char.
TypeInt8 | 1 Byte signed type
TypeUint8 | 1 Byte unsigned type
TypeInt16 | 2 Byte signed type
TypeUint16 | 2 Byte unsigned type
TypeInt32 | 4 Byte signed type
TypeUint32 | 4 Byte unsigned type
TypeInt64 | 8 Byte signed type
TypeUint64 | 8 Byte unsigned type
TypeReal32 | 4 Byte real type
TypeReal64 | 8 Byte real type
TypeString | String.
TypePtr | Pointer.
TypeValueType | Value.
TypeClass | Class: a task is defined as a class.
TypeArray | Array.
TypeObject | Object.
enum PLCI::PlciError

PlciError enum.

Enumerator
PlciError_OK | 0: no error
PlciError_InvalidArgument | 1: some function argument is wrong
PlciError_PlcError | 2: PLC error
PlciError_CommunicationBufferOverflow | 3: overflow of communication buffer
_PlciError_LAST | helper value
_PlciError_FATAL_BEGIN | helper value
PlciError_Fatal | 256: fatal error, no recovery possible
PlciError_Recoverable | 257: recoverable error
PlciError_Connect_Invalid_Socket | 258: try to connect to invalid socket
PlciError_Socket_in_use | 259: the socket is in use and can't be used to connect again
PlciError_Reader_timeout | 260: timeout occurred in the reader
PlciError_Write_timeout | 261: timeout occurred in the writer
PlciError_Confirmation_is_not_valid | 262: invalid response received
PlciError_InvalidType | 263: type ins invalid
PlciError_OutOfRange | 264: trying to use element out of range
PlciError_OutOfMemory | 265: no memory left
PlciError_Array_to_big | 266: the array received is to big
PlciError_Fatal_error_remoting_object_is_null | 267: remoting object used is not valid
PlciError_Can_not_establish_connection | 268: no connection possible
PlciError_Illegal_header | 269: header is not readable
PlciError_Remoting_nullpointer_exception | 270: null pointer exception
PlciError_Service_not_valid | 271: Service requested is not ready or not valid
PlciError_Exception | 272: unexpected exception
PlciError_Parameter_not_usable_for_service | 273: Function is used for different service, parameters only exist in special service.
PlciError_NotImplemented | 274: this error is not implemented
PlciError_FileError | 275: File error occurred
PlciError_MetaDataEmpty | 276: Both, local and global meta data is empty.
PlciError_Subscription_Invalid | 277: The Subscription is invalid and needs to be resubscribed
_PlciError_FATAL_END | helper value
enum PLCI::PlcState

PLC state can be obtained by using the device attribute service with the attribute StandardDeviceAttributes_PlcState.

Enumerator
PlcOn | PLC is reachable, but no project is loaded.
PlcLoading | PLC project is loading.
PlcStarting | Project is loaded and PLC will start.
PlcRunning | PLC project is running.
PlcHaltRequested | A halt for a breakpoint is requested. Breakpoint is not reached.
PlcHalt | Breakpoint is reached. PLC is in halt.
PlcStopping | PLC will stop.
PlcStop | PLC stopped.
PlcResetting | Reset of project is requested.
enum PLCI::StandardDeviceAttributes

Device attributes, that can be obtained from PLC.

Enumerator
StandardDeviceAttributes_Manufacturer | The manufacturer of the device.
StandardDeviceAttributes_ProductName | The name of the product as shown to the user.
StandardDeviceAttributes_HardwareVersion | The version of the hardware.
StandardDeviceAttributes_FirmwareVersion | The version of the OEM firmware.
StandardDeviceAttributes_EClrMaxApplicationDataSize | The maximum size of static and dynamic objects usable by the application.
StandardDeviceAttributes_EClrMaxApplicationRetainDataSize | The maximum size of static and dynamic retain objects usable by the application.
StandardDeviceAttributes_EClrMaxApplicationProgramSize | The maximum size of the application image running in the code section of the eCLR (meta + code).
StandardDeviceAttributes_EClrMaxRuntimeHeapSize | Capacity of the internal kernel memory management.
StandardDeviceAttributes_EClrRuntimeVersion | Represents the version of the eCLR kernel in a four-digit form. The representation is a doted decimal number string �Major.minor.revsn.build�.
StandardDeviceAttributes_EClrThreadingPriorityLevel | Amount of priority level the base system supports.
StandardDeviceAttributes_EClrFreeApplicationDataSize | The size of the data memory that is unused.
StandardDeviceAttributes_EClrFreeApplicationProgramSize | The size of the program memory that is unused.
StandardDeviceAttributes_SourceOnPlc | Indicates whether source code in located on the PLC.
StandardDeviceAttributes_EClrFreeRetainDataSize | The size of the retain data memory that is unused.
StandardDeviceAttributes_Identity | Identity of the device (type: string) usually a GUID.
StandardDeviceAttributes_ImageOnPlc | Indicates whether an image is located on the PLC.
StandardDeviceAttributes_EClrMetaCRC | Get the project meta crc from the PLC.
StandardDeviceAttributes_EClrImageTime | The time when the image was compiled.
StandardDeviceAttributes_EClrBootProjName | The name of the boot project.
StandardDeviceAttributes_PlcState | Get the state of the PLC: On, Stop, Run,...


PLCI: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • c
  • f
  • m
  • p
  • s
  • t
  • w
Here is a list of all documented namespace members with links to the namespaces they belong to:

- _ -

  • _PlciError_FATAL_BEGIN : PLCI
  • _PlciError_FATAL_END : PLCI
  • _PlciError_LAST : PLCI
  • _StandardCommunicationErrors : PLCI

- c -

  • CommErrors_CannotAccessPlcData : PLCI
  • CommErrors_CannotCreateVariableGroup : PLCI
  • CommErrors_CannotReadVariableValues : PLCI
  • CommErrors_CannotWriteVariableValues : PLCI
  • CommErrors_ExecutionError : PLCI
  • CommErrors_HeaderXsumError : PLCI
  • CommErrors_InputStreamEmpty : PLCI
  • CommErrors_InvalidCommand : PLCI
  • CommErrors_InvalidHandle : PLCI
  • CommErrors_InvalidPlcState : PLCI
  • CommErrors_InvalidProtocolVersion : PLCI
  • CommErrors_NoProgramOnTheDevice : PLCI
  • CommErrors_OtherMasterActive : PLCI
  • CommErrors_OutOfMemory : PLCI
  • CommErrors_ReadOnly : PLCI
  • CommErrors_RecvFailed : PLCI
  • CommErrors_RecvTimeout : PLCI
  • CommErrors_SendFailed : PLCI
  • CommErrors_SendTimeout : PLCI
  • CommErrors_UnknownMethodHandle : PLCI
  • CommErrors_UnknownObjectFormat : PLCI
  • CommErrors_UnknownServiceHandle : PLCI

- f -

  • FileError : PLCI
  • FileError_DeviceNotFound : PLCI
  • FileError_DiskFull : PLCI
  • FileError_FileNotFound : PLCI
  • FileError_FileOpened : PLCI
  • FileError_MethodFailed : PLCI
  • FileError_NoError : PLCI
  • FileError_OnlyOneFileAtSameTimeAllowed : PLCI
  • FileError_WriteProtection : PLCI
  • FileError_WrongHandle : PLCI
  • FileError_WrongSequence : PLCI

- m -

  • MetaElementType : PLCI

- p -

  • PlcHalt : PLCI
  • PlcHaltRequested : PLCI
  • PlciError : PLCI
  • PlciError_Array_to_big : PLCI
  • PlciError_Can_not_establish_connection : PLCI
  • PlciError_CommunicationBufferOverflow : PLCI
  • PlciError_Confirmation_is_not_valid : PLCI
  • PlciError_Connect_Invalid_Socket : PLCI
  • PlciError_Exception : PLCI
  • PlciError_Fatal : PLCI
  • PlciError_Fatal_error_remoting_object_is_null : PLCI
  • PlciError_FileError : PLCI
  • PlciError_Illegal_header : PLCI
  • PlciError_InvalidArgument : PLCI
  • PlciError_InvalidType : PLCI
  • PlciError_MetaDataEmpty : PLCI
  • PlciError_NotImplemented : PLCI
  • PlciError_OK : PLCI
  • PlciError_OutOfMemory : PLCI
  • PlciError_OutOfRange : PLCI
  • PlciError_Parameter_not_usable_for_service : PLCI
  • PlciError_PlcError : PLCI
  • PlciError_Reader_timeout : PLCI
  • PlciError_Recoverable : PLCI
  • PlciError_Remoting_nullpointer_exception : PLCI
  • PlciError_Service_not_valid : PLCI
  • PlciError_Socket_in_use : PLCI
  • PlciError_Subscription_Invalid : PLCI
  • PlciError_Write_timeout : PLCI
  • PlcLoading : PLCI
  • PlcOn : PLCI
  • PlcResetting : PLCI
  • PlcRunning : PLCI
  • PlcStarting : PLCI
  • PlcState : PLCI
  • PlcStop : PLCI
  • PlcStopping : PLCI

- s -

  • StandardCommunicationErrors : PLCI
  • StandardDeviceAttributes : PLCI
  • StandardDeviceAttributes_EClrBootProjName : PLCI
  • StandardDeviceAttributes_EClrFreeApplicationDataSize : PLCI
  • StandardDeviceAttributes_EClrFreeApplicationProgramSize : PLCI
  • StandardDeviceAttributes_EClrFreeRetainDataSize : PLCI
  • StandardDeviceAttributes_EClrImageTime : PLCI
  • StandardDeviceAttributes_EClrMaxApplicationDataSize : PLCI
  • StandardDeviceAttributes_EClrMaxApplicationProgramSize : PLCI
  • StandardDeviceAttributes_EClrMaxApplicationRetainDataSize : PLCI
  • StandardDeviceAttributes_EClrMaxRuntimeHeapSize : PLCI
  • StandardDeviceAttributes_EClrMetaCRC : PLCI
  • StandardDeviceAttributes_EClrRuntimeVersion : PLCI
  • StandardDeviceAttributes_EClrThreadingPriorityLevel : PLCI
  • StandardDeviceAttributes_FirmwareVersion : PLCI
  • StandardDeviceAttributes_HardwareVersion : PLCI
  • StandardDeviceAttributes_Identity : PLCI
  • StandardDeviceAttributes_ImageOnPlc : PLCI
  • StandardDeviceAttributes_Manufacturer : PLCI
  • StandardDeviceAttributes_PlcState : PLCI
  • StandardDeviceAttributes_ProductName : PLCI
  • StandardDeviceAttributes_SourceOnPlc : PLCI

- t -

  • TypeArray : PLCI
  • TypeBool : PLCI
  • TypeChar : PLCI
  • TypeClass : PLCI
  • TypeInt16 : PLCI
  • TypeInt32 : PLCI
  • TypeInt64 : PLCI
  • TypeInt8 : PLCI
  • TypeNull : PLCI
  • TypeObject : PLCI
  • TypePtr : PLCI
  • TypeReal32 : PLCI
  • TypeReal64 : PLCI
  • TypeString : PLCI
  • TypeUint16 : PLCI
  • TypeUint32 : PLCI
  • TypeUint64 : PLCI
  • TypeUint8 : PLCI
  • TypeUnknown : PLCI
  • TypeValueType : PLCI
  • TypeVoid : PLCI

- w -

  • wrap() : PLCI


PLCI: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Typedefs
  • Enumerations
  • Enumerator
  • wrap() : PLCI


PLCI: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Typedefs
  • Enumerations
  • Enumerator
  • PlcState : PLCI
  • StandardCommunicationErrors : PLCI
  • StandardDeviceAttributes : PLCI


PLCI: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Typedefs
  • Enumerations
  • Enumerator
  • _StandardCommunicationErrors : PLCI
  • FileError : PLCI
  • MetaElementType : PLCI
  • PlciError : PLCI
  • PlcState : PLCI
  • StandardDeviceAttributes : PLCI


PLCI: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Functions
  • Typedefs
  • Enumerations
  • Enumerator
  • _
  • c
  • f
  • p
  • s
  • t

- _ -

  • _PlciError_FATAL_BEGIN : PLCI
  • _PlciError_FATAL_END : PLCI
  • _PlciError_LAST : PLCI

- c -

  • CommErrors_CannotAccessPlcData : PLCI
  • CommErrors_CannotCreateVariableGroup : PLCI
  • CommErrors_CannotReadVariableValues : PLCI
  • CommErrors_CannotWriteVariableValues : PLCI
  • CommErrors_ExecutionError : PLCI
  • CommErrors_HeaderXsumError : PLCI
  • CommErrors_InputStreamEmpty : PLCI
  • CommErrors_InvalidCommand : PLCI
  • CommErrors_InvalidHandle : PLCI
  • CommErrors_InvalidPlcState : PLCI
  • CommErrors_InvalidProtocolVersion : PLCI
  • CommErrors_NoProgramOnTheDevice : PLCI
  • CommErrors_OtherMasterActive : PLCI
  • CommErrors_OutOfMemory : PLCI
  • CommErrors_ReadOnly : PLCI
  • CommErrors_RecvFailed : PLCI
  • CommErrors_RecvTimeout : PLCI
  • CommErrors_SendFailed : PLCI
  • CommErrors_SendTimeout : PLCI
  • CommErrors_UnknownMethodHandle : PLCI
  • CommErrors_UnknownObjectFormat : PLCI
  • CommErrors_UnknownServiceHandle : PLCI

- f -

  • FileError_DeviceNotFound : PLCI
  • FileError_DiskFull : PLCI
  • FileError_FileNotFound : PLCI
  • FileError_FileOpened : PLCI
  • FileError_MethodFailed : PLCI
  • FileError_NoError : PLCI
  • FileError_OnlyOneFileAtSameTimeAllowed : PLCI
  • FileError_WriteProtection : PLCI
  • FileError_WrongHandle : PLCI
  • FileError_WrongSequence : PLCI

- p -

  • PlcHalt : PLCI
  • PlcHaltRequested : PLCI
  • PlciError_Array_to_big : PLCI
  • PlciError_Can_not_establish_connection : PLCI
  • PlciError_CommunicationBufferOverflow : PLCI
  • PlciError_Confirmation_is_not_valid : PLCI
  • PlciError_Connect_Invalid_Socket : PLCI
  • PlciError_Exception : PLCI
  • PlciError_Fatal : PLCI
  • PlciError_Fatal_error_remoting_object_is_null : PLCI
  • PlciError_FileError : PLCI
  • PlciError_Illegal_header : PLCI
  • PlciError_InvalidArgument : PLCI
  • PlciError_InvalidType : PLCI
  • PlciError_MetaDataEmpty : PLCI
  • PlciError_NotImplemented : PLCI
  • PlciError_OK : PLCI
  • PlciError_OutOfMemory : PLCI
  • PlciError_OutOfRange : PLCI
  • PlciError_Parameter_not_usable_for_service : PLCI
  • PlciError_PlcError : PLCI
  • PlciError_Reader_timeout : PLCI
  • PlciError_Recoverable : PLCI
  • PlciError_Remoting_nullpointer_exception : PLCI
  • PlciError_Service_not_valid : PLCI
  • PlciError_Socket_in_use : PLCI
  • PlciError_Subscription_Invalid : PLCI
  • PlciError_Write_timeout : PLCI
  • PlcLoading : PLCI
  • PlcOn : PLCI
  • PlcResetting : PLCI
  • PlcRunning : PLCI
  • PlcStarting : PLCI
  • PlcStop : PLCI
  • PlcStopping : PLCI

- s -

  • StandardDeviceAttributes_EClrBootProjName : PLCI
  • StandardDeviceAttributes_EClrFreeApplicationDataSize : PLCI
  • StandardDeviceAttributes_EClrFreeApplicationProgramSize : PLCI
  • StandardDeviceAttributes_EClrFreeRetainDataSize : PLCI
  • StandardDeviceAttributes_EClrImageTime : PLCI
  • StandardDeviceAttributes_EClrMaxApplicationDataSize : PLCI
  • StandardDeviceAttributes_EClrMaxApplicationProgramSize : PLCI
  • StandardDeviceAttributes_EClrMaxApplicationRetainDataSize : PLCI
  • StandardDeviceAttributes_EClrMaxRuntimeHeapSize : PLCI
  • StandardDeviceAttributes_EClrMetaCRC : PLCI
  • StandardDeviceAttributes_EClrRuntimeVersion : PLCI
  • StandardDeviceAttributes_EClrThreadingPriorityLevel : PLCI
  • StandardDeviceAttributes_FirmwareVersion : PLCI
  • StandardDeviceAttributes_HardwareVersion : PLCI
  • StandardDeviceAttributes_Identity : PLCI
  • StandardDeviceAttributes_ImageOnPlc : PLCI
  • StandardDeviceAttributes_Manufacturer : PLCI
  • StandardDeviceAttributes_PlcState : PLCI
  • StandardDeviceAttributes_ProductName : PLCI
  • StandardDeviceAttributes_SourceOnPlc : PLCI

- t -

  • TypeArray : PLCI
  • TypeBool : PLCI
  • TypeChar : PLCI
  • TypeClass : PLCI
  • TypeInt16 : PLCI
  • TypeInt32 : PLCI
  • TypeInt64 : PLCI
  • TypeInt8 : PLCI
  • TypeNull : PLCI
  • TypeObject : PLCI
  • TypePtr : PLCI
  • TypeReal32 : PLCI
  • TypeReal64 : PLCI
  • TypeString : PLCI
  • TypeUint16 : PLCI
  • TypeUint32 : PLCI
  • TypeUint64 : PLCI
  • TypeUint8 : PLCI
  • TypeUnknown : PLCI
  • TypeValueType : PLCI
  • TypeVoid : PLCI


PLCI: Class List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 12]
▼N PLCI |
C CArray | Array implementation.
C CBadAllocException | Error thrown in case the system runs out of memory
C CBaseString | Base string implementation.
C CDataAccessService | Class has implementation of all necessary functions for the data access service. This class must not be constructed by the user
C CDataAccessSubscription | Implementation of subscription helper class for the data access service. This class must not be constructed by the user
C CDataAccessVariableList | Implementation of variable list helper class for the data access service. This class must not be constructed by the user
C CDeviceAttributeService | Class has implementation of all necessary functions for the device attribute service
C CException | Base exception class
C CFatalException | Class to signal fatal errors. This object is thrown as an exception. Members signal the type of error and show, that it is a fatal error (error_fatal). The exception holds the information which PLCI error is occurred and in case a there is additional information the second member is of type: StandardCommunicationErrors
C CFileService | Class has implementation of all necessary functions for the file service
C CMetaDataParser | Class has implementation of all necessary functions to browse the meta data
C CObject | This class encapsulates typed values that are send to and received from the device. They are used e.g. for the device attributes in the Device Attribute Service and for the online values in the Data Access Service. Instances of the this class can hold a value of an elementary data type or an array of such values.Additionally the type information is stored.There are overloaded methods to get and set the value of different types
C CPlcControlService | Class has implementation of all necessary functions for the plc control service
C CPlci | Included in this class are methods to connect and disconnect from PLC and an method to get a service from the connected PLC. The services are always connection specific
C CRecoverableException | Class to signal recoverable errors. This object is thrown as an exception. Members signal the type of error and show, that it is a recoverable error (error_Recoverable). The exception holds the information which PLCI error is occurred and in case a there is additional information the second member is of type: StandardCommunicationErrors or of type FileError
C CString | String implementation for Ansi encoding.
C CString16 | String16 implementation
C CWrapArray | Array that cannot allocate memory by it self. If an CArray is build and filled, it can be changed into an wrapped array with fixed size. Parts can be modified but no new element can be allocated. The function to wrap an array is wrap( const T* p, unsigned uCount ). It is an template class and can be used for all type of arrays supported by the PLCI
C MetaElement | Class to store the information of an meta element parsed from the metabin.img of the PLC
C TString | Template implementation of methods used by Ansi or Utf16 strings.


PLCI: PLCI::CBadAllocException Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CBadAllocException
List of all members
PLCI::CBadAllocException Class Reference

Error thrown in case the system runs out of memory. More...

Inheritance diagram for PLCI::CBadAllocException:
PLCI::CException

Additional Inherited Members

- Public Member Functions inherited from PLCI::CException
PlciError code () const
brief returns the stored error code

Detailed Description

Error thrown in case the system runs out of memory.


PLCI: PLCI::CException Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CException
Public Member Functions | List of all members
PLCI::CException Class Reference

Base exception class. More...

Inheritance diagram for PLCI::CException:
PLCI::CBadAllocException PLCI::CFatalException PLCI::CRecoverableException

Public Member Functions

PlciError code () const
brief returns the stored error code

Detailed Description

Base exception class.


PLCI: PLCI::CFatalException Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CFatalException
List of all members
PLCI::CFatalException Class Reference

Class to signal fatal errors.
This object is thrown as an exception. Members signal the type of error and show, that it is a fatal error (error_fatal).
The exception holds the information which PLCI error is occurred and in case a there is additional information the second member is of type: StandardCommunicationErrors. More...

Inheritance diagram for PLCI::CFatalException:
PLCI::CException

Additional Inherited Members

- Public Member Functions inherited from PLCI::CException
PlciError code () const
brief returns the stored error code

Detailed Description

Class to signal fatal errors.
This object is thrown as an exception. Members signal the type of error and show, that it is a fatal error (error_fatal).
The exception holds the information which PLCI error is occurred and in case a there is additional information the second member is of type: StandardCommunicationErrors.


PLCI: PLCI::CRecoverableException Class Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CRecoverableException
List of all members
PLCI::CRecoverableException Class Reference

Class to signal recoverable errors.
This object is thrown as an exception. Members signal the type of error and show, that it is a recoverable error (error_Recoverable).
The exception holds the information which PLCI error is occurred and in case a there is additional information the second member is of type: StandardCommunicationErrors or of type FileError. More...

Inheritance diagram for PLCI::CRecoverableException:
PLCI::CException

Additional Inherited Members

- Public Member Functions inherited from PLCI::CException
PlciError code () const
brief returns the stored error code

Detailed Description

Class to signal recoverable errors.
This object is thrown as an exception. Members signal the type of error and show, that it is a recoverable error (error_Recoverable).
The exception holds the information which PLCI error is occurred and in case a there is additional information the second member is of type: StandardCommunicationErrors or of type FileError.


PLCI: PLCI::CString16< E > Class Template Reference

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CString16
Public Member Functions | List of all members
PLCI::CString16< E > Class Template Reference

String16 implementation
. More...

Inheritance diagram for PLCI::CString16< E >:
PLCI::TString< wchar_t, E > PLCI::CBaseString

Public Member Functions

CString16 ()
Constructor of the CString16. More...
CString16 (const wchar_t *ps)
Constructor of the CString16. More...
CString16 (const BASE &a)
Constructor of the CString16. More...
void | operator= (const wchar_t *p)
Assigns values to the string. More...
int | CompareNoCase (const BASE &a) const
compares two strings More...
int | compare (const char *p2) const
Compares two character sequences. More...
int | compare (const BASE &a) const
Compares two character sequences. More...
bool | operator== (const wchar_t *p2) const
Lexicographically compares two strings. More...
bool | operator!= (const wchar_t *p2) const
Lexicographically compares two strings. More...
bool | operator== (const BASE &a) const
Lexicographically compares two strings. More...
bool | operator!= (const BASE &a) const
Lexicographically compares two strings. More...
bool | operator< (const BASE &a) const
Lexicographically compares two strings. More...
- Public Member Functions inherited from PLCI::TString< wchar_t, E >
void | operator= (const TString &a)
Assignment operator.
. More...
void | set (const wchar_t *p, unsigned len=-1)
add characters to string. More...
const wchar_t * | c_str () const
Return the const char pointer of the Ansi or Utf16 string. More...
void | operator+= (const wchar_t *p)
Append characters to a string. More...
void | operator+= (const TString &a)
Append string to a string. More...
wchar_t | at (size_t pos) const
Accesses specified byte. More...
wchar_t | operator[] (size_t pos) const
Accesses specified byte. More...
TString | Left (int nCount) const
TString | Right (int nCount) const
size_t | find_first_of (const wchar_t *s, unsigned pos=0) const
Find first occurrence of characters. More...
size_t | find_last_of (const wchar_t *s, unsigned pos=-1) const
Find last occurrence of characters. More...
size_t | find_first_not_of (const wchar_t *s, unsigned pos=0) const
Finds the first character equal to none of the characters in the given character sequence. More...
- Public Member Functions inherited from PLCI::CBaseString
CBaseString ()
Constructor of base string. More...
CBaseString (const CBaseString &a)
Constructor of base string. More...
~CBaseString ()
Destructor of a base string. More...
void | operator= (const CBaseString &)
Overloaded assignment operator. More...
void | clear ()
Clear string. More...
Encoding | GetEncoding () const
Check the encoding of the string. More...
unsigned | length () const
Get the length of the string. More...
bool | empty () const
Check if string is empty or not. More...

Additional Inherited Members

- Static Public Member Functions inherited from PLCI::TString< wchar_t, E >
static Encoding | DefaultEncoding ()
Get the encoding of the string. More...
- Static Public Member Functions inherited from PLCI::CBaseString
static unsigned | length (const void *p, Encoding encoding)
Get the length of the string. More...

Detailed Description

template<PLCI::Encoding E>
class PLCI::CString16< E >

String16 implementation
.

Constructor & Destructor Documentation

template<PLCI::Encoding E>
PLCI::CString16< E >::CString16 ( )
inline

Constructor of the CString16.

Parameters
none
Returns
none
template<PLCI::Encoding E>
PLCI::CString16< E >::CString16 ( const wchar_t * ps )
inline

Constructor of the CString16.

Parameters
const wchar_t* ps
Returns
none
template<PLCI::Encoding E>
PLCI::CString16< E >::CString16 ( const BASE & a )
inline

Constructor of the CString16.

Parameters
const BASE& a
Returns
none

Member Function Documentation

template<PLCI::Encoding E>
int PLCI::CString16< E >::compare ( const char * p2 ) const
inline

Compares two character sequences.

Parameters
const char* p2
Returns
Negative value if this string is less than the other character sequence, zero if the both character sequences are equal, positive value if this string is greater than the other character sequence.
template<PLCI::Encoding E>
int PLCI::CString16< E >::compare ( const BASE & a ) const
inline

Compares two character sequences.

Parameters
const BASE& a
Returns
Negative value if this string is less than the other character sequence, zero if the both character sequences are equal, positive value if this string is greater than the other character sequence.
template<PLCI::Encoding E>
int PLCI::CString16< E >::CompareNoCase ( const BASE & a ) const
inline

compares two strings

Parameters
const BASE& a
String to use for compare
Returns
Negative value if this string is less than the other character sequence, zero if the both character sequences are equal, positive value if this string is greater than the other character sequence.
template<PLCI::Encoding E>
bool PLCI::CString16< E >::operator!= ( const wchar_t * p2 ) const
inline

Lexicographically compares two strings.

Parameters
const wchar_t* p2
String to be compared to own data.
Returns
True if not equal, false if equal.
template<PLCI::Encoding E>
bool PLCI::CString16< E >::operator!= ( const BASE & a ) const
inline

Lexicographically compares two strings.

Parameters
const BASE& a
String to be compared to own data.
Returns
True if not equal, false if equal.
template<PLCI::Encoding E>
bool PLCI::CString16< E >::operator< ( const BASE & a ) const
inline

Lexicographically compares two strings.

Parameters
const BASE& a
Returns
True if const BASE& a is less than own data and false if not.
template<PLCI::Encoding E>
void PLCI::CString16< E >::operator= ( const wchar_t * p )
inline

Assigns values to the string.

Parameters
const wchar_t* p
character string, the string will be replaced with
Returns
none
template<PLCI::Encoding E>
bool PLCI::CString16< E >::operator== ( const wchar_t * p2 ) const
inline

Lexicographically compares two strings.

Parameters
const wchar_t* p2
Const char to be compared with own data.
Returns
True if equal, false if not equal.
template<PLCI::Encoding E>
bool PLCI::CString16< E >::operator== ( const BASE & a ) const
inline

Lexicographically compares two strings.

Parameters
const char* p2
Const char to be compared with own data.
Returns
True if equal, false if not equal.


PLCI: Class Index

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Class Index
C | M | T
C
CDataAccessSubscription (PLCI) CMetaDataParser (PLCI) CString16 (PLCI)
CDataAccessVariableList (PLCI) CObject (PLCI) CWrapArray (PLCI)
CArray (PLCI) CDeviceAttributeService (PLCI) CPlcControlService (PLCI)
M
CBadAllocException (PLCI) CException (PLCI) CPlci (PLCI)
CBaseString (PLCI) CFatalException (PLCI) CRecoverableException (PLCI) MetaElement (PLCI)
CDataAccessService (PLCI) CFileService (PLCI) CString (PLCI)
T
TString (PLCI)
C | M | T


PLCI: Class Hierarchy

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
Class Hierarchy
This inheritance list is sorted roughly, but not completely, alphabetically:
[detail level 123]
▼C PLCI::CBaseString | Base string implementation.
C PLCI::TString< T, E > | Template implementation of methods used by Ansi or Utf16 strings.
▼C PLCI::TString< char, Encoding_Ansi > |
C PLCI::CString | String implementation for Ansi encoding.
▼C PLCI::TString< wchar_t, E > |
C PLCI::CString16< Encoding_Utf16 > |
C PLCI::CString16< E > | String16 implementation
C PLCI::CDataAccessService | Class has implementation of all necessary functions for the data access service. This class must not be constructed by the user
C PLCI::CDataAccessSubscription | Implementation of subscription helper class for the data access service. This class must not be constructed by the user
C PLCI::CDataAccessVariableList | Implementation of variable list helper class for the data access service. This class must not be constructed by the user
C PLCI::CDeviceAttributeService | Class has implementation of all necessary functions for the device attribute service
▼C PLCI::CException | Base exception class
C PLCI::CBadAllocException | Error thrown in case the system runs out of memory
C PLCI::CFatalException | Class to signal fatal errors. This object is thrown as an exception. Members signal the type of error and show, that it is a fatal error (error_fatal). The exception holds the information which PLCI error is occurred and in case a there is additional information the second member is of type: StandardCommunicationErrors
C PLCI::CRecoverableException | Class to signal recoverable errors. This object is thrown as an exception. Members signal the type of error and show, that it is a recoverable error (error_Recoverable). The exception holds the information which PLCI error is occurred and in case a there is additional information the second member is of type: StandardCommunicationErrors or of type FileError
C PLCI::CFileService | Class has implementation of all necessary functions for the file service
C PLCI::CMetaDataParser | Class has implementation of all necessary functions to browse the meta data
C PLCI::CObject | This class encapsulates typed values that are send to and received from the device. They are used e.g. for the device attributes in the Device Attribute Service and for the online values in the Data Access Service. Instances of the this class can hold a value of an elementary data type or an array of such values.Additionally the type information is stored.There are overloaded methods to get and set the value of different types
C PLCI::CPlcControlService | Class has implementation of all necessary functions for the plc control service
C PLCI::CPlci | Included in this class are methods to connect and disconnect from PLC and an method to get a service from the connected PLC. The services are always connection specific
▼C PLCI::CWrapArray< T > | Array that cannot allocate memory by it self. If an CArray is build and filled, it can be changed into an wrapped array with fixed size. Parts can be modified but no new element can be allocated. The function to wrap an array is wrap( const T* p, unsigned uCount ). It is an template class and can be used for all type of arrays supported by the PLCI
C PLCI::CArray< T > | Array implementation.
▼C PLCI::CWrapArray< Byte > |
C PLCI::CArray< Byte > |
▼C PLCI::CWrapArray< PLCI::CString > |
C PLCI::CArray< PLCI::CString > |
C PLCI::MetaElement | Class to store the information of an meta element parsed from the metabin.img of the PLC


PLCI: Class Members

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • l
  • o
  • p
  • r
  • s
  • w
  • ~
Here is a list of all documented class members with links to the class documentation for each member:

- a -

  • ActivateBootProject() : PLCI::CPlcControlService
  • AddVariable() : PLCI::CDataAccessVariableList
  • append() : PLCI::CArray< T >
  • at()
: PLCI::CWrapArray< T >
, PLCI::TString< T, E >

- b -

  • back() : PLCI::CWrapArray< T >
  • begin() : PLCI::CWrapArray< T >

- c -

  • c_str() : PLCI::TString< T, E >
  • capacity() : PLCI::CArray< T >
  • CArray() : PLCI::CArray< T >
  • CBaseString() : PLCI::CBaseString
  • CDataAccessService() : PLCI::CDataAccessService
  • CDeviceAttributeService() : PLCI::CDeviceAttributeService
  • CFileService() : PLCI::CFileService
  • clear()
: PLCI::CArray< T >
, PLCI::CBaseString
  • Close() : PLCI::CFileService
  • CMetaDataParser() : PLCI::CMetaDataParser
  • CObject() : PLCI::CObject
  • code() : PLCI::CException
  • compare()
: PLCI::CString16< E >
, PLCI::CString
  • CompareNoCase()
: PLCI::CString16< E >
, PLCI::CString
  • Connect() : PLCI::CPlci
  • CPlcControlService() : PLCI::CPlcControlService
  • CPlci() : PLCI::CPlci
  • CreateSubscription() : PLCI::CDataAccessService
  • CreateVarList() : PLCI::CDataAccessService
  • CString() : PLCI::CString
  • CString16() : PLCI::CString16< E >
  • CWrapArray() : PLCI::CWrapArray< T >

- d -

  • data() : PLCI::CWrapArray< T >
  • DefaultEncoding() : PLCI::TString< T, E >
  • DeleteBootProject() : PLCI::CPlcControlService
  • Destroy()
: PLCI::CDataAccessSubscription
, PLCI::CDataAccessVariableList
  • Disconnect() : PLCI::CPlci

- e -

  • empty()
: PLCI::CBaseString
, PLCI::CWrapArray< T >
  • end() : PLCI::CWrapArray< T >
  • erase() : PLCI::CArray< T >

- f -

  • find_first_not_of() : PLCI::TString< T, E >
  • find_first_of() : PLCI::TString< T, E >
  • find_last_of() : PLCI::TString< T, E >
  • front() : PLCI::CWrapArray< T >

- g -

  • GetArray() : PLCI::CObject
  • GetArrayLength() : PLCI::CObject
  • GetArrayType() : PLCI::CObject
  • GetArrayTypeName() : PLCI::MetaElement
  • GetAttribute() : PLCI::CDeviceAttributeService
  • GetAttributes() : PLCI::CDeviceAttributeService
  • GetBitPosition() : PLCI::MetaElement
  • GetByteArray() : PLCI::CObject
  • GetChild() : PLCI::MetaElement
  • GetDataSize() : PLCI::MetaElement
  • GetDataType() : PLCI::MetaElement
  • GetEncoding()
: PLCI::CBaseString
, PLCI::CObject
  • GetFieldAmount() : PLCI::MetaElement
  • GetInstancePath() : PLCI::MetaElement
  • GetInstancePathDepth() : PLCI::MetaElement
  • GetLowerBound() : PLCI::MetaElement
  • GetMetaRoot() : PLCI::CMetaDataParser
  • GetName() : PLCI::MetaElement
  • GetNextElement() : PLCI::MetaElement
  • GetParent() : PLCI::MetaElement
  • GetPreviousElement() : PLCI::MetaElement
  • GetResponse() : PLCI::CDataAccessSubscription
  • GetService() : PLCI::CPlci
  • GetString() : PLCI::CObject
  • GetStringArray() : PLCI::CObject
  • GetStringPtrArray() : PLCI::CObject
  • GetTransferPaketSize() : PLCI::CFileService
  • GetType() : PLCI::CObject
  • GetTypeName() : PLCI::MetaElement
  • GetUpperBound() : PLCI::MetaElement
  • GetValue() : PLCI::CObject
  • GetValueAt() : PLCI::CObject
  • GetVariableAmount() : PLCI::CDataAccessVariableList
  • GetWString() : PLCI::CObject
  • GetWStringArray() : PLCI::CObject

- i -

  • Init() : PLCI::CMetaDataParser
  • IsArray()
: PLCI::CObject
, PLCI::MetaElement
  • IsElementary()
: PLCI::CObject
, PLCI::MetaElement
  • IsElementaryArray() : PLCI::CObject
  • IsOPC() : PLCI::MetaElement
  • IsProgram() : PLCI::MetaElement
  • IsResource() : PLCI::MetaElement
  • IsString()
: PLCI::CObject
, PLCI::MetaElement
  • IsStringArray() : PLCI::CObject
  • IsStringPtrArray() : PLCI::CObject
  • IsStruct() : PLCI::MetaElement
  • IsTask() : PLCI::MetaElement
  • IsValueType()
: PLCI::CObject
, PLCI::MetaElement

- l -

  • Left() : PLCI::TString< T, E >
  • length() : PLCI::CBaseString

- o -

  • OpenRead() : PLCI::CFileService
  • OpenWrite() : PLCI::CFileService
  • operator!=() : PLCI::CString16< E > , PLCI::CString
  • operator+=() : PLCI::TString< T, E >
  • operator<() : PLCI::CString16< E > , PLCI::CString
  • operator=()
: PLCI::CArray< T >
, PLCI::CBaseString
, PLCI::CObject
, PLCI::CString16< E >
, PLCI::CString
, PLCI::TString< T, E >
  • operator==() : PLCI::CString16< E > , PLCI::CString
  • operator[]() : PLCI::CWrapArray< T > , PLCI::TString< T, E >

- p -

  • pop_back() : PLCI::CArray< T >
  • push_back() : PLCI::CArray< T >

- r -

  • Read()
: PLCI::CFileService
, PLCI::CObject
  • ReadVariables() : PLCI::CDataAccessService
  • RemoveFile() : PLCI::CFileService
  • Reset() : PLCI::CPlcControlService
  • resize() : PLCI::CArray< T >
  • Right() : PLCI::TString< T, E >

- s -

  • set() : PLCI::TString< T, E >
  • SetArray() : PLCI::CObject
  • SetArrayPtr() : PLCI::CObject
  • SetAttribute() : PLCI::CDeviceAttributeService
  • SetAttributes() : PLCI::CDeviceAttributeService
  • SetString() : PLCI::CObject
  • SetStringArray() : PLCI::CObject
  • SetValue() : PLCI::CObject
  • SetWString() : PLCI::CObject
  • size() : PLCI::CWrapArray< T >
  • StartPlc() : PLCI::CPlcControlService
  • StopPlc() : PLCI::CPlcControlService

- w -

  • Write()
: PLCI::CFileService
, PLCI::CObject
  • WriteVariables() : PLCI::CDataAccessService

- ~ -

  • ~CBaseString() : PLCI::CBaseString
  • ~CMetaDataParser() : PLCI::CMetaDataParser
  • ~CObject() : PLCI::CObject


PLCI: Class Members - Functions

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • i
  • l
  • o
  • p
  • r
  • s
  • w
  • ~

- a -

  • ActivateBootProject() : PLCI::CPlcControlService
  • AddVariable() : PLCI::CDataAccessVariableList
  • append() : PLCI::CArray< T >
  • at()
: PLCI::CWrapArray< T >
, PLCI::TString< T, E >

- b -

  • back() : PLCI::CWrapArray< T >
  • begin() : PLCI::CWrapArray< T >

- c -

  • c_str() : PLCI::TString< T, E >
  • capacity() : PLCI::CArray< T >
  • CArray() : PLCI::CArray< T >
  • CBaseString() : PLCI::CBaseString
  • CDataAccessService() : PLCI::CDataAccessService
  • CDeviceAttributeService() : PLCI::CDeviceAttributeService
  • CFileService() : PLCI::CFileService
  • clear()
: PLCI::CArray< T >
, PLCI::CBaseString
  • Close() : PLCI::CFileService
  • CMetaDataParser() : PLCI::CMetaDataParser
  • CObject() : PLCI::CObject
  • code() : PLCI::CException
  • compare()
: PLCI::CString16< E >
, PLCI::CString
  • CompareNoCase()
: PLCI::CString16< E >
, PLCI::CString
  • Connect() : PLCI::CPlci
  • CPlcControlService() : PLCI::CPlcControlService
  • CPlci() : PLCI::CPlci
  • CreateSubscription() : PLCI::CDataAccessService
  • CreateVarList() : PLCI::CDataAccessService
  • CString() : PLCI::CString
  • CString16() : PLCI::CString16< E >
  • CWrapArray() : PLCI::CWrapArray< T >

- d -

  • data() : PLCI::CWrapArray< T >
  • DefaultEncoding() : PLCI::TString< T, E >
  • DeleteBootProject() : PLCI::CPlcControlService
  • Destroy()
: PLCI::CDataAccessSubscription
, PLCI::CDataAccessVariableList
  • Disconnect() : PLCI::CPlci

- e -

  • empty()
: PLCI::CBaseString
, PLCI::CWrapArray< T >
  • end() : PLCI::CWrapArray< T >
  • erase() : PLCI::CArray< T >

- f -

  • find_first_not_of() : PLCI::TString< T, E >
  • find_first_of() : PLCI::TString< T, E >
  • find_last_of() : PLCI::TString< T, E >
  • front() : PLCI::CWrapArray< T >

- g -

  • GetArray() : PLCI::CObject
  • GetArrayLength() : PLCI::CObject
  • GetArrayType() : PLCI::CObject
  • GetArrayTypeName() : PLCI::MetaElement
  • GetAttribute() : PLCI::CDeviceAttributeService
  • GetAttributes() : PLCI::CDeviceAttributeService
  • GetBitPosition() : PLCI::MetaElement
  • GetByteArray() : PLCI::CObject
  • GetChild() : PLCI::MetaElement
  • GetDataSize() : PLCI::MetaElement
  • GetDataType() : PLCI::MetaElement
  • GetEncoding()
: PLCI::CBaseString
, PLCI::CObject
  • GetFieldAmount() : PLCI::MetaElement
  • GetInstancePath() : PLCI::MetaElement
  • GetInstancePathDepth() : PLCI::MetaElement
  • GetLowerBound() : PLCI::MetaElement
  • GetMetaRoot() : PLCI::CMetaDataParser
  • GetName() : PLCI::MetaElement
  • GetNextElement() : PLCI::MetaElement
  • GetParent() : PLCI::MetaElement
  • GetPreviousElement() : PLCI::MetaElement
  • GetResponse() : PLCI::CDataAccessSubscription
  • GetService() : PLCI::CPlci
  • GetString() : PLCI::CObject
  • GetStringArray() : PLCI::CObject
  • GetStringPtrArray() : PLCI::CObject
  • GetTransferPaketSize() : PLCI::CFileService
  • GetType() : PLCI::CObject
  • GetTypeName() : PLCI::MetaElement
  • GetUpperBound() : PLCI::MetaElement
  • GetValue() : PLCI::CObject
  • GetValueAt() : PLCI::CObject
  • GetVariableAmount() : PLCI::CDataAccessVariableList
  • GetWString() : PLCI::CObject
  • GetWStringArray() : PLCI::CObject

- i -

  • Init() : PLCI::CMetaDataParser
  • IsArray()
: PLCI::CObject
, PLCI::MetaElement
  • IsElementary()
: PLCI::CObject
, PLCI::MetaElement
  • IsElementaryArray() : PLCI::CObject
  • IsOPC() : PLCI::MetaElement
  • IsProgram() : PLCI::MetaElement
  • IsResource() : PLCI::MetaElement
  • IsString()
: PLCI::CObject
, PLCI::MetaElement
  • IsStringArray() : PLCI::CObject
  • IsStringPtrArray() : PLCI::CObject
  • IsStruct() : PLCI::MetaElement
  • IsTask() : PLCI::MetaElement
  • IsValueType()
: PLCI::CObject
, PLCI::MetaElement

- l -

  • Left() : PLCI::TString< T, E >
  • length() : PLCI::CBaseString

- o -

  • OpenRead() : PLCI::CFileService
  • OpenWrite() : PLCI::CFileService
  • operator!=() : PLCI::CString16< E > , PLCI::CString
  • operator+=() : PLCI::TString< T, E >
  • operator<() : PLCI::CString16< E > , PLCI::CString
  • operator=()
: PLCI::CArray< T >
, PLCI::CBaseString
, PLCI::CObject
, PLCI::CString16< E >
, PLCI::CString
, PLCI::TString< T, E >
  • operator==() : PLCI::CString16< E > , PLCI::CString
  • operator[]() : PLCI::CWrapArray< T > , PLCI::TString< T, E >

- p -

  • pop_back() : PLCI::CArray< T >
  • push_back() : PLCI::CArray< T >

- r -

  • Read()
: PLCI::CFileService
, PLCI::CObject
  • ReadVariables() : PLCI::CDataAccessService
  • RemoveFile() : PLCI::CFileService
  • Reset() : PLCI::CPlcControlService
  • resize() : PLCI::CArray< T >
  • Right() : PLCI::TString< T, E >

- s -

  • set() : PLCI::TString< T, E >
  • SetArray() : PLCI::CObject
  • SetArrayPtr() : PLCI::CObject
  • SetAttribute() : PLCI::CDeviceAttributeService
  • SetAttributes() : PLCI::CDeviceAttributeService
  • SetString() : PLCI::CObject
  • SetStringArray() : PLCI::CObject
  • SetValue() : PLCI::CObject
  • SetWString() : PLCI::CObject
  • size() : PLCI::CWrapArray< T >
  • StartPlc() : PLCI::CPlcControlService
  • StopPlc() : PLCI::CPlcControlService

- w -

  • Write()
: PLCI::CFileService
, PLCI::CObject
  • WriteVariables() : PLCI::CDataAccessService

- ~ -

  • ~CBaseString() : PLCI::CBaseString
  • ~CMetaDataParser() : PLCI::CMetaDataParser
  • ~CObject() : PLCI::CObject


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CArray
PLCI::CArray< T > Member List

This is the complete list of members for PLCI::CArray< T >, including all inherited members.

append(const CWrapArray< T > &ar) | PLCI::CArray< T > | inline
at(unsigned ix) const | PLCI::CWrapArray< T > | inline
at(unsigned ix) | PLCI::CWrapArray< T > | inline
back() const | PLCI::CWrapArray< T > | inline
begin() const | PLCI::CWrapArray< T > | inline
begin() | PLCI::CWrapArray< T > | inline
capacity() const | PLCI::CArray< T > | inline
CArray() | PLCI::CArray< T > | inline
CArray(const CArray< T > &a) | PLCI::CArray< T > | inline
clear() | PLCI::CArray< T > | inline
CWrapArray() | PLCI::CWrapArray< T > | inline
CWrapArray(const T *p, unsigned uCount) | PLCI::CWrapArray< T > | inline
data() const | PLCI::CWrapArray< T > | inline
data() | PLCI::CWrapArray< T > | inline
empty() const | PLCI::CWrapArray< T > | inline
end() const | PLCI::CWrapArray< T > | inline
end() | PLCI::CWrapArray< T > | inline
erase(unsigned ix, unsigned uCount=1) | PLCI::CArray< T > | inline
front() const | PLCI::CWrapArray< T > | inline
operator=(const CArray< T > &a) | PLCI::CArray< T > | inline
operator[](unsigned ix) const | PLCI::CWrapArray< T > | inline
operator[](unsigned ix) | PLCI::CWrapArray< T > | inline
pop_back() | PLCI::CArray< T > | inline
push_back(const T &a) | PLCI::CArray< T > | inline
resize(unsigned uCount) | PLCI::CArray< T > | inline
size() const | PLCI::CWrapArray< T > | inline


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CBadAllocException
PLCI::CBadAllocException Member List

This is the complete list of members for PLCI::CBadAllocException, including all inherited members.

code() const PLCI::CException inline


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CBaseString
PLCI::CBaseString Member List

This is the complete list of members for PLCI::CBaseString, including all inherited members.

CBaseString() | PLCI::CBaseString | inline
CBaseString(const CBaseString &a) | PLCI::CBaseString | inline
clear() | PLCI::CBaseString |
empty() const | PLCI::CBaseString | inline
GetEncoding() const | PLCI::CBaseString | inline
length(const void *p, Encoding encoding) | PLCI::CBaseString | static
length() const | PLCI::CBaseString | inline
operator=(const CBaseString &) | PLCI::CBaseString |
~CBaseString() | PLCI::CBaseString | inline


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CDataAccessService
PLCI::CDataAccessService Member List

This is the complete list of members for PLCI::CDataAccessService, including all inherited members.

CDataAccessService(PLCI_internal::CRemoting *pRemoting, CPlci *pPLci) | PLCI::CDataAccessService
CreateSubscription(CDataAccessVariableList *VariableList) | PLCI::CDataAccessService
CreateVarList() | PLCI::CDataAccessService
ReadVariables(CDataAccessVariableList *VariableList, CArray< CObject > &Values) | PLCI::CDataAccessService
WriteVariables(CDataAccessVariableList *VariableList, CArray< CObject > &Values) | PLCI::CDataAccessService


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CDataAccessSubscription
PLCI::CDataAccessSubscription Member List

This is the complete list of members for PLCI::CDataAccessSubscription, including all inherited members.

Destroy() | PLCI::CDataAccessSubscription
GetResponse(CArray< CObject > &Values) | PLCI::CDataAccessSubscription


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CDataAccessVariableList
PLCI::CDataAccessVariableList Member List

This is the complete list of members for PLCI::CDataAccessVariableList, including all inherited members.

AddVariable(CString InstancePath) | PLCI::CDataAccessVariableList
Destroy() | PLCI::CDataAccessVariableList
GetVariableAmount() | PLCI::CDataAccessVariableList


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CDeviceAttributeService
PLCI::CDeviceAttributeService Member List

This is the complete list of members for PLCI::CDeviceAttributeService, including all inherited members.

CDeviceAttributeService(PLCI_internal::CRemoting *pRemoting, CPlci *pPLci) | PLCI::CDeviceAttributeService
GetAttribute(signed short int attributeId, CObject &value) | PLCI::CDeviceAttributeService
GetAttributes(const CWrapArray< signed short int > &attributes, CArray< CObject > &values) | PLCI::CDeviceAttributeService
SetAttribute(signed short int attributeId, const CObject &value) | PLCI::CDeviceAttributeService
SetAttributes(const CWrapArray< signed short int > &attributes, const CWrapArray< CObject > &values) | PLCI::CDeviceAttributeService


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CException
PLCI::CException Member List

This is the complete list of members for PLCI::CException, including all inherited members.

code() const PLCI::CException inline


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CFatalException
PLCI::CFatalException Member List

This is the complete list of members for PLCI::CFatalException, including all inherited members.

code() const PLCI::CException inline


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CFileService
PLCI::CFileService Member List

This is the complete list of members for PLCI::CFileService, including all inherited members.

CFileService(PLCI_internal::CRemoting *pRemoting, CPlci *pPLci) | PLCI::CFileService
Close(Int32 lFileHandle) | PLCI::CFileService
GetTransferPaketSize() | PLCI::CFileService
OpenRead(const char *FileName) | PLCI::CFileService
OpenWrite(const char *FileName) | PLCI::CFileService
Read(Int32 lFileHandle, CArray< Byte > &Data, Int32 lLengthToRead) | PLCI::CFileService
RemoveFile(const char *FileName) | PLCI::CFileService
Write(Int32 lFileHandle, CArray< Byte > Data) | PLCI::CFileService


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CMetaDataParser
PLCI::CMetaDataParser Member List

This is the complete list of members for PLCI::CMetaDataParser, including all inherited members.

CMetaDataParser() | PLCI::CMetaDataParser
GetMetaRoot() | PLCI::CMetaDataParser
Init(CArray< Byte > Data) | PLCI::CMetaDataParser
~CMetaDataParser() | PLCI::CMetaDataParser


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CObject
PLCI::CObject Member List

This is the complete list of members for PLCI::CObject, including all inherited members.

CObject() | PLCI::CObject |
CObject(const CObject &a) | PLCI::CObject |
GetArray() | PLCI::CObject | inline
GetArray() const | PLCI::CObject | inline
GetArrayLength() const | PLCI::CObject | inline
GetArrayType() const | PLCI::CObject | inline
GetByteArray() | PLCI::CObject | inline
GetByteArray() const | PLCI::CObject | inline
GetEncoding() const | PLCI::CObject | inline
GetString() const | PLCI::CObject | inline
GetStringArray() const | PLCI::CObject | inline
GetStringArray() | PLCI::CObject | inline
GetStringPtrArray() const | PLCI::CObject | inline
GetStringPtrArray() | PLCI::CObject | inline
GetType() const | PLCI::CObject | inline
GetValue(T &val) const | PLCI::CObject | inline
GetValue(ClrInt64 &val) const | PLCI::CObject | inline
GetValueAt(unsigned ix, T &t) const | PLCI::CObject | inline
GetWString() const | PLCI::CObject | inline
GetWStringArray() const | PLCI::CObject | inline
GetWStringArray() | PLCI::CObject | inline
IsArray() const | PLCI::CObject | inline
IsElementary() const | PLCI::CObject | inline
IsElementaryArray() const | PLCI::CObject | inline
IsString() const | PLCI::CObject | inline
IsStringArray() const | PLCI::CObject | inline
IsStringPtrArray() const | PLCI::CObject | inline
IsValueType() const | PLCI::CObject | inline
operator=(const CObject &a) | PLCI::CObject |
Read(PLCI_internal::CBinaryReaderBase &rd) | PLCI::CObject |
SetArray(void *p, MetaElementType uElementType, unsigned uElementCount) | PLCI::CObject |
SetArrayPtr(void *p, MetaElementType uElementType, unsigned uElementCount) | PLCI::CObject |
SetString(const char *p, Encoding e=CString::DefaultEncoding()) | PLCI::CObject | inline
SetStringArray(const CWrapArray< CString > &ar) | PLCI::CObject |
SetStringArray(const CWrapArray< const char * > &ar) | PLCI::CObject |
SetValue(bool val) | PLCI::CObject | inline
SetWString(const wchar_t *p) | PLCI::CObject | inline
Write(PLCI_internal::CBinaryWriterBase &wr) const | PLCI::CObject |
~CObject() | PLCI::CObject |


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CPlcControlService
PLCI::CPlcControlService Member List

This is the complete list of members for PLCI::CPlcControlService, including all inherited members.

ActivateBootProject() | PLCI::CPlcControlService
CPlcControlService(PLCI_internal::CRemoting *pRemoting, CPlci *pPLci) | PLCI::CPlcControlService
DeleteBootProject() | PLCI::CPlcControlService
Reset() | PLCI::CPlcControlService
StartPlc(StartMode mode) | PLCI::CPlcControlService
StopPlc() | PLCI::CPlcControlService


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CPlci
PLCI::CPlci Member List

This is the complete list of members for PLCI::CPlci, including all inherited members.

Connect(CString Adress, unsigned short uPort, unsigned short uTimeout) | PLCI::CPlci |
Connect(CString ConnectionString) | PLCI::CPlci |
CPlci() | PLCI::CPlci |
Disconnect() | PLCI::CPlci |
GetService() | PLCI::CPlci | inline


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CRecoverableException
PLCI::CRecoverableException Member List

This is the complete list of members for PLCI::CRecoverableException, including all inherited members.

code() const PLCI::CException inline


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CString16
PLCI::CString16< E > Member List

This is the complete list of members for PLCI::CString16< E >, including all inherited members.

at(size_t pos) const | PLCI::TString< wchar_t, E > | inline
c_str() const | PLCI::TString< wchar_t, E > | inline
CBaseString() | PLCI::CBaseString | inline
CBaseString(const CBaseString &a) | PLCI::CBaseString | inline
clear() | PLCI::CBaseString |
compare(const char *p2) const | PLCI::CString16< E > | inline
compare(const BASE &a) const | PLCI::CString16< E > | inline
CompareNoCase(const BASE &a) const | PLCI::CString16< E > | inline
CString16() | PLCI::CString16< E > | inline
CString16(const wchar_t *ps) | PLCI::CString16< E > | inline
CString16(const BASE &a) | PLCI::CString16< E > | inline
DefaultEncoding() | PLCI::TString< wchar_t, E > | inlinestatic
empty() const | PLCI::CBaseString | inline
find_first_not_of(const wchar_t *s, unsigned pos=0) const | PLCI::TString< wchar_t, E > | inline
find_first_of(const wchar_t *s, unsigned pos=0) const | PLCI::TString< wchar_t, E > | inline
find_last_of(const wchar_t *s, unsigned pos=-1) const | PLCI::TString< wchar_t, E > | inline
GetEncoding() const | PLCI::CBaseString | inline
Left(int nCount) const | PLCI::TString< wchar_t, E > | inline
length(const void *p, Encoding encoding) | PLCI::CBaseString | static
length() const | PLCI::CBaseString | inline
operator!=(const wchar_t *p2) const | PLCI::CString16< E > | inline
operator!=(const BASE &a) const | PLCI::CString16< E > | inline
operator+=(const wchar_t *p) | PLCI::TString< wchar_t, E > | inline
operator+=(const TString &a) | PLCI::TString< wchar_t, E > | inline
operator<(const BASE &a) const | PLCI::CString16< E > | inline
operator=(const wchar_t *p) | PLCI::CString16< E > | inline
TString< wchar_t, E >::operator=(const TString &a) | PLCI::TString< wchar_t, E > | inline
PLCI::CBaseString::operator=(const CBaseString &) | PLCI::CBaseString |
operator==(const wchar_t *p2) const | PLCI::CString16< E > | inline
operator==(const BASE &a) const | PLCI::CString16< E > | inline
operator[](size_t pos) const | PLCI::TString< wchar_t, E > | inline
Right(int nCount) const | PLCI::TString< wchar_t, E > | inline
set(const wchar_t *p, unsigned len=-1) | PLCI::TString< wchar_t, E > | inline
~CBaseString() | PLCI::CBaseString | inline


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CString
PLCI::CString Member List

This is the complete list of members for PLCI::CString, including all inherited members.

at(size_t pos) const | PLCI::TString< char, Encoding_Ansi > | inline
c_str() const | PLCI::TString< char, Encoding_Ansi > | inline
CBaseString() | PLCI::CBaseString | inline
CBaseString(const CBaseString &a) | PLCI::CBaseString | inline
clear() | PLCI::CBaseString |
compare(const char *p2) const | PLCI::CString | inline
compare(const BASE &a) const | PLCI::CString | inline
CompareNoCase(const BASE &a) const | PLCI::CString | inline
CString() | PLCI::CString | inline
CString(const char *ps) | PLCI::CString | inline
CString(const BASE &a) | PLCI::CString | inline
DefaultEncoding() | PLCI::TString< char, Encoding_Ansi > | inlinestatic
empty() const | PLCI::CBaseString | inline
find_first_not_of(const char *s, unsigned pos=0) const | PLCI::TString< char, Encoding_Ansi > | inline
find_first_of(const char *s, unsigned pos=0) const | PLCI::TString< char, Encoding_Ansi > | inline
find_last_of(const char *s, unsigned pos=-1) const | PLCI::TString< char, Encoding_Ansi > | inline
GetEncoding() const | PLCI::CBaseString | inline
Left(int nCount) const | PLCI::TString< char, Encoding_Ansi > | inline
length(const void *p, Encoding encoding) | PLCI::CBaseString | static
length() const | PLCI::CBaseString | inline
operator!=(const char *p2) const | PLCI::CString | inline
operator!=(const BASE &a) const | PLCI::CString | inline
operator+=(const char *p) | PLCI::TString< char, Encoding_Ansi > | inline
operator+=(const TString &a) | PLCI::TString< char, Encoding_Ansi > | inline
operator<(const BASE &a) const | PLCI::CString | inline
operator=(const char *p) | PLCI::CString | inline
TString< char, Encoding_Ansi >::operator=(const TString &a) | PLCI::TString< char, Encoding_Ansi > | inline
PLCI::CBaseString::operator=(const CBaseString &) | PLCI::CBaseString |
operator==(const char *p2) const | PLCI::CString | inline
operator==(const BASE &a) const | PLCI::CString | inline
operator[](size_t pos) const | PLCI::TString< char, Encoding_Ansi > | inline
Right(int nCount) const | PLCI::TString< char, Encoding_Ansi > | inline
set(const char *p, unsigned len=-1) | PLCI::TString< char, Encoding_Ansi > | inline
~CBaseString() | PLCI::CBaseString | inline


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • CWrapArray
PLCI::CWrapArray< T > Member List

This is the complete list of members for PLCI::CWrapArray< T >, including all inherited members.

at(unsigned ix) const | PLCI::CWrapArray< T > | inline
at(unsigned ix) | PLCI::CWrapArray< T > | inline
back() const | PLCI::CWrapArray< T > | inline
begin() const | PLCI::CWrapArray< T > | inline
begin() | PLCI::CWrapArray< T > | inline
CWrapArray() | PLCI::CWrapArray< T > | inline
CWrapArray(const T *p, unsigned uCount) | PLCI::CWrapArray< T > | inline
data() const | PLCI::CWrapArray< T > | inline
data() | PLCI::CWrapArray< T > | inline
empty() const | PLCI::CWrapArray< T > | inline
end() const | PLCI::CWrapArray< T > | inline
end() | PLCI::CWrapArray< T > | inline
front() const | PLCI::CWrapArray< T > | inline
operator[](unsigned ix) const | PLCI::CWrapArray< T > | inline
operator[](unsigned ix) | PLCI::CWrapArray< T > | inline
size() const | PLCI::CWrapArray< T > | inline


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • MetaElement
PLCI::MetaElement Member List

This is the complete list of members for PLCI::MetaElement, including all inherited members.

GetArrayTypeName() | PLCI::MetaElement | inline
GetBitPosition() | PLCI::MetaElement | inline
GetChild() | PLCI::MetaElement | inline
GetDataSize() | PLCI::MetaElement | inline
GetDataType() | PLCI::MetaElement | inline
GetFieldAmount() | PLCI::MetaElement | inline
GetInstancePath() | PLCI::MetaElement |
GetInstancePathDepth() | PLCI::MetaElement | inline
GetLowerBound() | PLCI::MetaElement | inline
GetName() | PLCI::MetaElement | inline
GetNextElement() | PLCI::MetaElement | inline
GetParent() | PLCI::MetaElement | inline
GetPreviousElement() | PLCI::MetaElement | inline
GetTypeName() | PLCI::MetaElement | inline
GetUpperBound() | PLCI::MetaElement | inline
IsArray() | PLCI::MetaElement | inline
IsElementary() | PLCI::MetaElement | inline
IsOPC() | PLCI::MetaElement | inline
IsProgram() | PLCI::MetaElement | inline
IsResource() | PLCI::MetaElement | inline
IsString() | PLCI::MetaElement | inline
IsStruct() | PLCI::MetaElement | inline
IsTask() | PLCI::MetaElement | inline
IsValueType() | PLCI::MetaElement | inline


PLCI: Member List

  • Class List
  • Class Index
  • Class Hierarchy
  • Class Members
  • PLCI
  • TString
PLCI::TString< T, E > Member List

This is the complete list of members for PLCI::TString< T, E >, including all inherited members.

at(size_t pos) const | PLCI::TString< T, E > | inline
c_str() const | PLCI::TString< T, E > | inline
CBaseString() | PLCI::CBaseString | inline
CBaseString(const CBaseString &a) | PLCI::CBaseString | inline
clear() | PLCI::CBaseString |
DefaultEncoding() | PLCI::TString< T, E > | inlinestatic
empty() const | PLCI::CBaseString | inline
find_first_not_of(const T *s, unsigned pos=0) const | PLCI::TString< T, E > | inline
find_first_of(const T *s, unsigned pos=0) const | PLCI::TString< T, E > | inline
find_last_of(const T *s, unsigned pos=-1) const | PLCI::TString< T, E > | inline
GetEncoding() const | PLCI::CBaseString | inline
Left(int nCount) const | PLCI::TString< T, E > | inline
length(const void *p, Encoding encoding) | PLCI::CBaseString | static
length() const | PLCI::CBaseString | inline
operator+=(const T *p) | PLCI::TString< T, E > | inline
operator+=(const TString &a) | PLCI::TString< T, E > | inline
operator=(const TString &a) | PLCI::TString< T, E > | inline
PLCI::CBaseString::operator=(const CBaseString &) | PLCI::CBaseString |
operator[](size_t pos) const | PLCI::TString< T, E > | inline
Right(int nCount) const | PLCI::TString< T, E > | inline
set(const T *p, unsigned len=-1) | PLCI::TString< T, E > | inline
~CBaseString() | PLCI::CBaseString | inline


PLCI: KW-TL Directory Reference

  • P
  • EclrOaLib
  • KW-TL
KW-TL Directory Reference

Files

file | rm_config.h
file | rm_heap.h
file | rm_service.h


PLCI: DLL Directory Reference

  • P
  • DLL
DLL Directory Reference

Directories

directory PLCI_DLL


PLCI: P Directory Reference

  • P
P Directory Reference

Directories

directory | DLL
directory | EclrOaLib


PLCI: EclrOaLib Directory Reference

  • P
  • EclrOaLib
EclrOaLib Directory Reference

Directories

directory KW-TL


PLCI: PLCI_DLL Directory Reference

  • P
  • DLL
  • PLCI_DLL
PLCI_DLL Directory Reference

Files

file PLCI.h


PLCI: Related Pages

Related Pages
Here is a list of all related documentation pages:
[detail level 123]
Prerequisite
▼ Communication
Example: Polling the PLC
Use Cases
Adaptations
Transport Layers
Datatypes
▼ Language Bindings
▼ How to handle exceptions
Example: Polling the PLC
▼ PLCI Services
▼ Device attribute service
Example how to check the vendor
Data access service
▼ PLC control service
Example: How to control the PLC and to check the current state
▼ File service
How to read data from a file
How to write data from a file
How to download the bootproject to the PLC and activate it
▼ Meta Data Parser
Example: complete parse of MetaData
Generated on Tue Feb 26 2019 09:42:18 for PLCI by doxygen 1.8.7
Updated on Nov 8 2019 by Yaskawa America, Inc.