User Space Methods
CreateUserSpace
CreateUserSpace($UserSpaceName, $USLib, $InitSize, $Authority', $InitChar=' ' ) - Creates a User Space object.
Arguments |
Value |
Description |
$UserSpaceName |
|
User Space name |
$USLib |
|
User Space library name |
$InitSize |
1024 - default |
The initial size of the User Space being created |
$Authority |
|
User Space object authority |
$InitChar |
‘ ‘ - default |
The initial value of all bytes in the User Space |
Sample Code
|
$US->CreateUserSpace($US_name, $US_lib, 2000, '*ALL', 'X') |
|
RetrieveUserSpaceAttr()
RetrieveUserSpaceAttr() - Retrieves information about the current attributes and the current operational statistics of the User Space.
Sample Code
|
$USattr-> RetrieveUserSpaceAttr() |
|
RetrieveUserSpaceSize()
RetrieveUserSpaceSize() - The Retrieves information about the current size of the User Space.
Sample Code
|
$USsize-> RetrieveUserSpaceSize() |
|
DeleteUserSpace()
DeleteUserSpace() - Removes the User Space object.
Sample Code
|
$US->DeleteUserSpace(); |
|
WriteUserSpace
WriteUserSpace($Startpos, $Valuelen, $Value) - Writes data to a User Space object.
Arguments |
Value |
Description |
$Startpos |
1 - default |
The first byte of the User Space from where the data is to be written. It must have a value greater than 0 |
$Valuelen |
|
The length of the new data. The length must be greater than 0 |
$Value |
|
The new data to be placed into the User Space. The field must be at least as long as the length of the data parameter |
Sample Code
|
$US->WriteUserSpace(1, 100,"Test data"); |
|
ReadUserSpace
ReadUserSpace($Frompos, $Readlen) - Read data from a User Space object.
Arguments |
Value |
Description |
$Frompos |
1 - default |
The first byte of the User Space from where the data is to be read. It must have a value greater than 0 |
$Readlen |
|
The length of the data to be read. The length must be greater than 0 |
Sample Code
|
$data = $US->ReadUserSpace(1, 50); |
|
A PHP Script That Shows The Usage of All User Space Methods
|
<pre>
|
|