Skip to content
Start free evaluation

pdcomm::opcua::MfcClientConfiguration

Struct

Connection and identity settings of an MfcClientWorker.

struct MfcClientConfiguration

The worker takes the configuration by value. It wipes its copy of the private key after connecting and its copy of the user credentials after activation and on destruction; wipe the caller's copy yourself. The defaults differ from options(): a 5000 ms timeout and #PDCOMM_OPCUA_USER_SECRET_HEADER_POLICY_ONLY.

Members

anonymous

Field

Activate anonymously instead of with userName and userSecret.

bool anonymous = false

applicationUri

Field

ApplicationUri in UTF-8, at most 4096 bytes; must match the client certificate.

CStringA applicationUri = "urn:pdcomm:opcua:client"

certificateDer

Field

Client application instance certificate (DER, at most 64 KiB).

std::vector<uint8_t> certificateDer

endpoint

Field

opc.tcp:// endpoint URL in UTF-8, at most 4096 bytes.

CStringA endpoint

flags

Field

Bitwise OR of ::pdcomm_opcua_option_flags values.

uint32_t flags = PDCOMM_OPCUA_USER_SECRET_HEADER_POLICY_ONLY

mode

Field

Requested ::pdcomm_opcua_security_mode value.

uint32_t mode = PDCOMM_OPCUA_SIGN_AND_ENCRYPT

policy

Field

Requested ::pdcomm_opcua_policy value.

uint32_t policy = PDCOMM_OPCUA_AES256SHA256RSAPSS

privateKeyPem

Field

Private key of that certificate (PEM, at most 64 KiB).

std::vector<uint8_t> privateKeyPem

timeoutMs

Field

Timeout of each network exchange and each outstanding request, 1 to 300000 ms.

uint32_t timeoutMs = 5000

trustedServerDer

Field

Server certificate to trust (DER, at most 64 KiB).

std::vector<uint8_t> trustedServerDer

userName

Field

UTF-8 user name for a UserNameIdentityToken, at most 4096 bytes; used when anonymous is false.

CStringA userName

userSecret

Field

UTF-8 password, at most 16 KiB; used when anonymous is false.

std::vector<uint8_t> userSecret