SysMCBDGetFirstID (FUN)

FUNCTION SysMCBDGetFirstID : UDINT

CpuCoreBindingDesc helper function
SysMCBDGetFirstID returns the CoreId (i.e. the position) of the first set bit in CpuCoreBindingDesc.CpuCoreBits.
InOut:

Scope

Name

Type

Comment

Return

SysMCBDGetFirstID

UDINT

Returns a valid CoreId if ERR_OK, otherwise the result is undefined.

Input

pBindingDesc

POINTER TO CpuCoreBindingDesc

Pointer to the description of the core binding.

pResult

POINTER TO RTS_IEC_RESULT

Pointer to a variable to return an error code.
  • ERR_OK: First found CoreId is returned.

  • ERR_PARAMETER: CpuCoreBindingDesc is invalid pointer.

  • ERR_END_OF_OBJECT: No core was set.