blobAppendValue()

Works like blobSetValue(), but the value is appended to the blob.

Synopsis

int blobAppendValue(blob &target, anytype value, int len[, bool bigEndian]);

Parameters

Parameter Description
&target The blob
value Value of any type, which has to be appended
len Length of the value that should be appended. The type can be of type "anytype" (for example, anytype len = 4; ).
bigEndian Defines whether a value is a Big Endian or Little Endian, TRUE uses bigEndian

Return Value

The length of the target blob (after the value was appended).

Errors

Missing or wrong arguments

Description

If data are sent in a blob, then the data have to be treated with CTRL functions for using the data in CTRL. Similar to blobSetValue(), but this function append the value to the blob.

Example

main()
{
  blob target;
  int len, pos;
  string s;
  anytype value;
  bool bigendian;
  s = "FFAB003AFF";
  target = s;
  DebugN(target);
  len = 1;
  value = 5;
  bigendian = TRUE;
  DebugN("Blob AppendValue : " + blobAppendValue( target,
  value, len, bigendian ));
//length of blob is 6 = FF AB 0 3A FF 5
  DebugN(target);
//ff ab 0 3a ff 5
}

Assignment

Blob functions

Availability

CTRL