libopc
|
Go to the source code of this file.
Typedefs | |
typedef struct OPC_CONTAINER_STRUCT | opcContainer |
Enumerations | |
enum | opcContainerOpenMode { OPC_OPEN_READ_ONLY, OPC_OPEN_WRITE_ONLY, OPC_OPEN_READ_WRITE, OPC_OPEN_TEMPLATE, OPC_OPEN_TRANSITION } |
enum | opcContainerCloseMode { OPC_CLOSE_NOW, OPC_CLOSE_TRIM, OPC_CLOSE_DEFRAG } |
Functions | |
opcContainer * | opcContainerOpen (const xmlChar *fileName, opcContainerOpenMode mode, void *userContext, const xmlChar *destName) |
opcContainer * | opcContainerOpenMem (const opc_uint8_t *data, opc_uint32_t data_len, opcContainerOpenMode mode, void *userContext) |
opcContainer * | opcContainerOpenIO (opcFileReadCallback *ioread, opcFileWriteCallback *iowrite, opcFileCloseCallback *ioclose, opcFileSeekCallback *ioseek, opcFileTrimCallback *iotrim, opcFileFlushCallback *ioflush, void *iocontext, pofs_t file_size, opcContainerOpenMode mode, void *userContext) |
opc_error_t | opcContainerClose (opcContainer *c, opcContainerCloseMode mode) |
void * | opcContainerGetUserContext (opcContainer *c) |
opc_error_t | opcContainerDump (opcContainer *c, FILE *out) |
int | opcContainerFlatExport (opcContainer *c, const xmlChar *fileName) |
int | opcContainerFlatImport (opcContainer *c, const xmlChar *fileName) |
const xmlChar * | opcContentTypeFirst (opcContainer *container) |
const xmlChar * | opcContentTypeNext (opcContainer *container, const xmlChar *type) |
const xmlChar * | opcExtensionFirst (opcContainer *container) |
const xmlChar * | opcExtensionNext (opcContainer *container, const xmlChar *ext) |
const xmlChar * | opcExtensionGetType (opcContainer *container, const xmlChar *ext) |
const xmlChar * | opcExtensionRegister (opcContainer *container, const xmlChar *ext, const xmlChar *type) |
const xmlChar * | opcRelationTypeFirst (opcContainer *container) |
const xmlChar * | opcRelationTypeNext (opcContainer *container, const xmlChar *type) |
const xmlChar * | opcExternalTargetFirst (opcContainer *container) |
const xmlChar * | opcExternalTargetNext (opcContainer *container, const xmlChar *target) |
The container.h module has the fundamental methods for dealing with ZIP-based OPC container.
OPC container can be opened in READ-ONLY mode, WRITE-ONLY mode, READ/WRITE mode, TEMPLATE mode and TRANSITION mode. The most notable mode is the READ/WRITE mode, which gives you concurrent stream-based READ and WRITE access to a single ZIP-based OPC container. This is achieved without the use of temporary files by taking advantage of the OPC specific “interleave” mode.
The TEMPLATE mode allows very fast customized "cloning" of ZIP-based OPC container by using "RAW access" to the ZIP streams. The TRANSITION mode is a special version of the TEMPLATE mode, which allows transition-based READ/WRITE access to the ZIP-based OPC container using a temporary file.
typedef struct OPC_CONTAINER_STRUCT opcContainer |
Handle to an OPC container created by opcContainerOpen.
Modes for opcContainerClose.
enum opcContainerOpenMode |
Modes for opcContainerOpen();
opc_error_t opcContainerClose | ( | opcContainer * | c, |
opcContainerCloseMode | mode | ||
) |
Close an OPC container.
[in] | c. | opcContainer openered by opcContainerOpen. |
[in] | mode. | For more information see opcContainerCloseMode. |
opc_error_t opcContainerDump | ( | opcContainer * | c, |
FILE * | out | ||
) |
List all types, relations and parts of the container c to out.
int opcContainerFlatExport | ( | opcContainer * | c, |
const xmlChar * | fileName | ||
) |
Exports the OPC container to "Flat OPC" (http://blogs.msdn.com/b/ericwhite/archive/2008/09/29/the-flat-opc-format.aspx). The flat versions of an OPC file are very important when dealing with e.g XSL(T)-based or Javascript-based transformations.
int opcContainerFlatImport | ( | opcContainer * | c, |
const xmlChar * | fileName | ||
) |
Imports the flat version of an OPC container.
void* opcContainerGetUserContext | ( | opcContainer * | c | ) |
Returns the unmodified user context passed to opcContainerOpen.
opcContainer* opcContainerOpen | ( | const xmlChar * | fileName, |
opcContainerOpenMode | mode, | ||
void * | userContext, | ||
const xmlChar * | destName | ||
) |
Opens a ZIP-based OPC container.
[in] | fileName. | For more details see opcContainerOpenMode. |
[in] | mode. | For more details see opcContainerOpenMode. |
[in] | userContext. | Will not be modified by libopc. Can be used to e.g. store the "this" pointer for C++ bindings. |
[in] | destName. | For more details see opcContainerOpenMode. |
opcContainer* opcContainerOpenIO | ( | opcFileReadCallback * | ioread, |
opcFileWriteCallback * | iowrite, | ||
opcFileCloseCallback * | ioclose, | ||
opcFileSeekCallback * | ioseek, | ||
opcFileTrimCallback * | iotrim, | ||
opcFileFlushCallback * | ioflush, | ||
void * | iocontext, | ||
pofs_t | file_size, | ||
opcContainerOpenMode | mode, | ||
void * | userContext | ||
) |
Opens a ZIP-based OPC container from memory.
[in] | ioread. | |
[in] | iowrite. | |
[in] | ioclose. | |
[in] | ioseek. | |
[in] | iotrim. | |
[in] | ioflush. | |
[in] | iocontext. | |
[in] | file_size. | |
[in] | userContext. | Will not be modified by libopc. Can be used to e.g. store the "this" pointer for C++ bindings. |
[in] | mode. | For more details see opcContainerOpenMode. |
opcContainer* opcContainerOpenMem | ( | const opc_uint8_t * | data, |
opc_uint32_t | data_len, | ||
opcContainerOpenMode | mode, | ||
void * | userContext | ||
) |
Opens a ZIP-based OPC container from memory.
[in] | data. | |
[in] | data_len. | |
[in] | userContext. | Will not be modified by libopc. Can be used to e.g. store the "this" pointer for C++ bindings. |
[in] | mode. | For more details see opcContainerOpenMode. |
const xmlChar* opcContentTypeFirst | ( | opcContainer * | container | ) |
const xmlChar* opcContentTypeNext | ( | opcContainer * | container, |
const xmlChar * | type | ||
) |
const xmlChar* opcExtensionFirst | ( | opcContainer * | container | ) |
const xmlChar* opcExtensionGetType | ( | opcContainer * | container, |
const xmlChar * | ext | ||
) |
const xmlChar* opcExtensionNext | ( | opcContainer * | container, |
const xmlChar * | ext | ||
) |
const xmlChar* opcExtensionRegister | ( | opcContainer * | container, |
const xmlChar * | ext, | ||
const xmlChar * | type | ||
) |
const xmlChar* opcExternalTargetFirst | ( | opcContainer * | container | ) |
const xmlChar* opcExternalTargetNext | ( | opcContainer * | container, |
const xmlChar * | target | ||
) |
const xmlChar* opcRelationTypeFirst | ( | opcContainer * | container | ) |
const xmlChar* opcRelationTypeNext | ( | opcContainer * | container, |
const xmlChar * | type | ||
) |