SysShm Implementation Library Documentation ¶ Company System Title SysShm Implementation Version 3.5.17.0 Categories System|SysLibs Author CODESYS Development GmbH Placeholder SysShm Implementation Description 1 ¶ Library to get access to a shared memory on the target. Contents: ¶ SysSharedMemoryClose (Function) SysSharedMemoryCreate (Function) SysSharedMemoryDelete (Function) SysSharedMemoryGetPointer (Function) SysSharedMemoryOpen2 (Function) SysSharedMemoryRead (Function) SysSharedMemoryReadByte (Function) SysSharedMemoryWrite (Function) SysSharedMemoryWriteByte (Function) Indices and tables ¶ 1 Based on SysShm Implementation.library, last modified 20.04.2021, 16:08:07. LibDoc 4.4.0.0-b.27 The content file SysShm Implementation.clean.json was generated with CODESYS V3.5 SP16 Patch 3 on 20.04.2021, 16:08:07.
SysSharedMemoryClose (FUN) ¶ FUNCTION SysSharedMemoryClose : RTS_IEC_RESULT Close a shared memory object specified by handle. RETURN: Returns the runtime system error code (see CmpErrors_Itfs.library): InOut: Scope Name Type Comment Return SysSharedMemoryClose RTS_IEC_RESULT Input hShm RTS_IEC_HANDLE Handle to the shared memory
SysSharedMemoryCreate (FUN) ¶ FUNCTION SysSharedMemoryCreate : RTS_IEC_HANDLE Create a new shared memory object specified by name. NOTE: If the shared memory object still exists, a valid handle is returned, but with the error code ERR_DUPLICATE. RETURN: Handle to the shared memory object or RTS_INVALID_HANDLE if failed InOut: Scope Name Type Comment Return SysSharedMemoryCreate RTS_IEC_HANDLE Inout Const pszName STRING Name of the shared memory Input ulPhysicalAddress __UXINT Optional physical address. pulSize POINTER TO __UXINT Pointer to requested size of the shared memory. pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library):
SysSharedMemoryDelete (FUN) ¶ FUNCTION SysSharedMemoryDelete : RTS_IEC_RESULT Delete a shared memory object specified by handle RETURN: Returns the runtime system error code (see CmpErrors.library) InOut: Scope Name Type Comment Return SysSharedMemoryDelete RTS_IEC_RESULT Input hShm RTS_IEC_HANDLE Handle to the shared memory
SysSharedMemoryGetPointer (FUN) ¶ FUNCTION SysSharedMemoryGetPointer : POINTER TO BYTE Get the pointer to the shared memory RETURN: Returns the runtime system error code (see CmpErrors.library) InOut: Scope Name Type Comment Return SysSharedMemoryGetPointer POINTER TO BYTE Input hShm RTS_IEC_HANDLE Handle to the shared memory pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysSharedMemoryRead (FUN) ¶ FUNCTION SysSharedMemoryRead : __UXINT This function can be used to read a defined number of bytes from a Shared Memory, starting at a certain offset. RETURN: Number of bytes read from the shared memory InOut: Scope Name Type Comment Return SysSharedMemoryRead __UXINT Input hShm RTS_IEC_HANDLE Handle to the shared memory ulOffset __UXINT Offset in the shared memory, where reading should start pbyData POINTER TO BYTE Pointer to buffer to read in data ulSize __UXINT Number of bytes to read pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysSharedMemoryOpen2 (FUN) ¶ FUNCTION SysSharedMemoryOpen2 : RTS_IEC_HANDLE Opens an existing shared memory object specified by name. NOTE: If shared memory object not exists, an error code is returned an it is not created! RETURN: Handle to the shared memory object or RTS_INVALID_HANDLE if failed InOut: Scope Name Type Comment Return SysSharedMemoryOpen2 RTS_IEC_HANDLE Inout Const pszName STRING Name of the shared memory Input ulPhysicalAddress __UXINT Optional physical address: pulSize POINTER TO __UXINT Pointer to requested size of the shared memory. pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library):
SysSharedMemoryReadByte (FUN) ¶ FUNCTION SysSharedMemoryReadByte : __UXINT This function can be used to read “byte-wise” a defined number of bytes, starting at a certain offset. RETURN: Number of bytes read from the shared memory InOut: Scope Name Type Comment Return SysSharedMemoryReadByte __UXINT Input hShm RTS_IEC_HANDLE Handle to the shared memory ulOffset __UXINT Offset in the shared memory, where reading should start pbyData POINTER TO BYTE Pointer to buffer to read in data ulSize __UXINT Number of bytes to read pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysSharedMemoryWrite (FUN) ¶ FUNCTION SysSharedMemoryWrite : __UXINT This function can be used to write a defined number of bytes to a Shared Memory area, starting at a certain offset address. RETURN: Number of bytes written to the shared memory InOut: Scope Name Type Comment Return SysSharedMemoryWrite __UXINT Input hShm RTS_IEC_HANDLE Handle to the shared memory ulOffset __UXINT Offset in the shared memory pbyData POINTER TO BYTE Pointer to buffer with write data ulSize __UXINT Number of bytes to write pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)
SysSharedMemoryWriteByte (FUN) ¶ FUNCTION SysSharedMemoryWriteByte : __UXINT This function can be used to write a defined number of bytes in “byte-wise” manner to a Shared Memory area, starting at a certain offset address. RETURN: Number of bytes written to the shared memory InOut: Scope Name Type Comment Return SysSharedMemoryWriteByte __UXINT Input hShm RTS_IEC_HANDLE Handle to the shared memory ulOffset __UXINT Offset in the shared memory pbyData POINTER TO BYTE Pointer to buffer with write data ulSize __UXINT Number of bytes to write pResult POINTER TO RTS_IEC_RESULT Pointer to runtime system error code (see CmpErrors.library)