
Byte arrays are used to read from and write to storage units. The functions and macros in this section are used to manipulate byte arrays, or read and write byte arrays in a storage unit or storage unit view. They are available as samples in the UTILS subdirectory.
The following lists the byte array functions and macros in alphabetic order.
This function tests if two byte arrays are equal.
Signature
#include <BArray.h>
ODBoolean AreByteArraysEqual (ODByteArray *ba1,
ODByteArray *ba2)
|
Parameters
Returns
| kODTrue | The byte arrays are equal. |
| kODFalse | The byte arrays are not equal. |
This function copies a byte array and returns a pointer to that copy.
Signature
#include <BArray.h>
.
ODByteArray *CopyByteArray (ODByteArray *fromBA)
|
Parameters
Returns
This function copies a buffer into a byte array.
Signature
#include <BArray.h> ODByteArray CopyByteArrayStruct (ODByteArray *fromBA) |
Parameters
Returns
This function creates a byte array from a buffer of a specified length.
Signature
#include <BArray.h> ODByteArray *CreateByteArray (void *buffer, ODULong size) |
Parameters
Returns
This function creates a byte array from a buffer of a specified length.
Signature
#include <BArray.h> ODByteArray CreateByteArrayStruct (void *buffer, ODULong size) |
Parameters
Returns
This function creates an empty byte array.
Signature
#include <BArray.h> ODByteArray *CreateEmptyByteArray (ODULong maximum) |
Parameters
Returns
This function creates an empty byte array.
Signature
#include <BArray.h> ODByteArray CreateEmptyByteArrayStruct (ODULong maximum) |
Parameters
Returns
This function deletes the specified byte array and its content.
Signature
#include <BArray.h> void DisposeByteArray (ODByteArray *byteArray) |
Parameters
Returns
This macro deletes the specified byte array and its content.
Signature
#include <BArray.h> void DisposeByteArrayStruct (ODByteArray byteArray) |
Parameters
Returns
This function reads a value from a storage unit, starting at the offset.
Signature
#include <StorUtil.h>
ODULong StorageUnitGetValue (ODStorageUnit *su,
Environment *ev,
ODULong size,
ODPtr buffer)
|
Parameters
Returns
This macro writes a promise into a storage unit, starting at the offset.
Signature
#include <StorUtil.h>
void StorageUnitSetPromiseValue (ODStorageUnit *su,
Environment *ev,
ODULong type,
ODULong offset,
ODULong size,
void *buffer,
ODPart sourcePart)
|
Parameters
Returns
This macro writes a value into a storage unit, starting at the offset.
Signature
#include <StorUtil.h>
void StorageUnitSetValue (ODStorageUnit *su,
Environment *ev,
ODULong size,
void *buffer)
|
Parameters
Returns
This function reads data from the currently focused value in the specified storage unit, starting at the offset.
Signature
#include <StorUtil.h>
ODULong StorageUnitViewGetValue (ODStorageUnitView *suv,
Environment *ev,
ODULong size,
ODPtr buffer)
|
Parameters
Returns
This macro writes data to the currently focused value in the specified storage unit, starting at the offset.
Signature
#include <StorUtil.h>
void StorageUnitViewSetValue (ODStorageUnitView *suv,
Environment *ev,
ODULong size,
void *buffer)
|
Parameters
Returns
This function instantiates a byte array to the specified buffer of a specified size.
Signature
#include <BArray.h>
void UseByteArray (ODByteArray *ba,
void *buffer,
ODULong size)
|
Parameters
Returns
None.