cookie CmGetBoxContents2

Description

This function returns the native representations of entries of a CmContainer, i.e. the programmed entries of Product Item Options (PIO). Any other call, such as, for example, CmGetInfo reads the effective representation, i.e. the actual properties of the Product Item Optons (PIO).

tmr_02

Triple Mode Redundancy-related information (TMR)

 

  • C, C++
  • C#
  • Python

Syntax

int CMAPIENTRY CmGetBoxContents2(HCMSysEntry hcmse, CMULONG flCtrl, CMULONG ulFirmCode, CMBOXINFO *pcmBoxInfo, CMBOXENTRY2 *pcmBoxEntry, CMUINT cbBoxEntry)

Parameter

hcmse contains a handle opened by CmAccess / CmAccess2 (can be Box Access, Entry Access or Subsystem Access).

flCtrl contains one of the following commands:

nav_open CM_GBC_FI: All entries returned must match the Firm Item provided in ulFirmCode.

nav_open CM_GBC_BOX: All entries returned must match the CmContainer properties provided in pcmBoxInfo.

nav_open CM_GBC_ALLENTRIES: All entries of all connected CmContainers available at hcmse will be returned.

The above flags can be or'ed with

nav_open CM_GBC_USELOCALTIME: Returns the time values using the local time zone instead of UTC.

The flags CM_GBC_FI and CM_GBC_BOX can be combined. If the value of ulFirmCode or pcmBoxInfo is not relevant for the desired flag operation, the value is ignored.

ulFirmCode contains the Firm Code of the Firm Item the returned entries should have (used with CM_GBC_FI flag).

pcmBoxInfo contains the CmContainer information of the CmContainer the entries should be returned from (used with CM_GBC_BOX flag).

pcmBoxEntry contains an array of hmtoggle_plus1 CMBOXENTRY2 structure.

cbBoxEntry contains the number of CMBOXENTRY2 elements stored in pcmBoxEntry.  

Return

The number of found entries is returned. If the number is larger than cbBoxEntry, the array in pcmBoxEntry is too small. In this case only cbBoxEntry entries are stored in pcmBoxEntry. To get the rest call the function with the correct array length again. If the array is to small the error code CMERROR_BUFFER_OVERFLOW is set. If 0 is returned, then no entry was found and depending on flCtrl error code CMERROR_ENTRY_NOT_FOUND or CMERROR_BOX_NOT_FOUND is set.

Notes

CmGetBoxContents2() is supported since CodeMeter Version 4.30.

Syntax

public CmBoxEntry2[] CmGetBoxContents2(HCMSysEntry hcmse, CmGetBoxContentsOption Ctrl, uint FirmCode, CmBoxInfo BoxInfo)

Parameter

BoxEntry contains an array of the hmtoggle_plus1 CmBoxEntry2 class.

CmGetBoxContentsOption allows to set the following event flags:

nav_open AllEntries:All entries of all connected CmContainers available at hcmse will be returned.

nav_open FirmItem: All entries returned must match the Firm Item provided in FirmCode.

nav_open Box: All entries returned must match the CmContainer properties provided in BoxInfo.

nav_open UseLocalTime: Returns the time values using the local time zone instead of UTC.

FirmCode contains the Firm Code of the Firm Item the returned entries should have (used with CmGetBoxContentsOption FirmItem flag).

BoxInfo contains the CmContainer information of the CmContainer returned from (used with CmGetBoxContentsOption Box flag).

Return

The found entries are returned. If an empty array is returned, then no entry was found and depending on Ctrl error code Errors.EntryNotFound or BoxNotFound is set.

Notes

CmGetBoxContents2() is supported since CodeMeter Version 4.30.

 

Syntax

import cmapi
 
handle.CmGetBoxContents2(flCtrl: int, ulFirmCode: int,
 pcmBoxInfo: cmapi.CMBOXINFO) -> List[cmapi.CMBOXENTRY2]

Parameter

handle is the opened by CmAccess2 (can be Box Access, Entry Access or Subsystem Access).

flCtrl contains one of the following commands:

nav_open cmapi.CM_GBC_FI: All entries returned must match the Firm Item provided in ulFirmCode.

nav_open cmapi.CM_GBC_BOX: All entries returned must match the CmContainer properties provided in pcmBoxInfo.

nav_open cmapi.CM_GBC_ALLENTRIES: All entries of all connected CmContainers available at the handle will be returned.

The above flags can be or'ed with

nav_open cmapi.CM_GBC_USELOCALTIME: Returns the time values using the local time zone instead of UTC.

The flags cmapi.CM_GBC_FI and cmapi.CM_GBC_BOX can be combined. If the value of ulFirmCode or pcmBoxInfo is not relevant for the desired flag operation, the value is ignored.

ulFirmCode contains the Firm Code of the Firm Item the returned entries should have (used with cmapi.CM_GBC_FI flag).

pcmBoxInfo contains the CmContainer information of the CmContainer the entries should be returned from (used with cmapi.CM_GBC_BOX flag).

Return

The list of found hmtoggle_plus1 cmapi.CMBOXENTRY2 entries are returned. If no entry was found, depending on flCtrl error code cmapi.CMERROR_ENTRY_NOT_FOUND or CMERROR_BOX_NOT_FOUND is set.

Notes

CmGetBoxContents2() is supported since CodeMeter Version 4.30.