davide carboni / Mbed 2 deprecated pymite_http_get

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

obj.c File Reference

obj.c File Reference

Object Type. More...

Go to the source code of this file.

Functions

PmReturn_t obj_loadFromImg (PmMemSpace_t memspace, uint8_t const **paddr, pPmObj_t *r_pobj)
 Loads an object from an image in memory.
PmReturn_t obj_loadFromImgObj (pPmObj_t pimg, pPmObj_t *r_pobj)
 Loads a code object from a code image object.
int8_t obj_isFalse (pPmObj_t pobj)
 Finds the boolean value of the given object.
PmReturn_t obj_isIn (pPmObj_t pobj, pPmObj_t pitem)
 Returns the boolean true if the item is in the object.
int8_t obj_compare (pPmObj_t pobj1, pPmObj_t pobj2)
 Compares two objects for equality.
PmReturn_t obj_print (pPmObj_t pobj, uint8_t marshallString)
 Print an object, thereby using objects helpers.
PmReturn_t obj_repr (pPmObj_t pobj, pPmObj_t *r_pstr)
 Returns by reference a string object that is the human-readable representation of the object.

Detailed Description

Object Type.

Object type operations.

Definition in file obj.c.


Function Documentation

int8_t obj_compare ( pPmObj_t  pobj1,
pPmObj_t  pobj2 
)

Compares two objects for equality.

Parameters:
pobj1Ptr to first object.
pobj2Ptr to second object.
Returns:
C_SAME if the items are equivalent, C_DIFFER otherwise.

Definition at line 253 of file obj.c.

int8_t obj_isFalse ( pPmObj_t  pobj )

Finds the boolean value of the given object.

Parameters:
pobjPtr to object to test.
Returns:
Nonzero value if object is False.

Definition at line 110 of file obj.c.

PmReturn_t obj_isIn ( pPmObj_t  pobj,
pPmObj_t  pitem 
)

Returns the boolean true if the item is in the object.

Parameters:
pobjPtr to container object
pitemPtr to item

Definition at line 163 of file obj.c.

PmReturn_t obj_loadFromImg ( PmMemSpace_t  memspace,
uint8_t const **  paddr,
pPmObj_t r_pobj 
)

Loads an object from an image in memory.

Return pointer to object. Leave add pointing one byte past end of obj.

The following lists the simple object types and their image structures: -None: -type: int8_t - OBJ_TYPE_NON

-Int: -type: int8_t - OBJ_TYPE_INT -value: int32_t - signed integer value

-Float: -type: int8_t - OBJ_TYPE_FLOAT -value: float32_t - 32-bit floating point value

-Slice (is this allowed in img?): -type: int8_t - OBJ_TYPE_SLICE -index1: int16_t - first index. -index2: int16_t - second index.

Parameters:
memspacememory space/type
paddrptr to ptr to obj return by reference: paddr pts to first byte after obj
r_pobjReturn arg, the loaded object.
Returns:
Return status

Definition at line 32 of file obj.c.

PmReturn_t obj_loadFromImgObj ( pPmObj_t  pimg,
pPmObj_t r_pobj 
)

Loads a code object from a code image object.

Parameters:
pimgPtr to a code image object
r_pobjReturn arg, the loaded object
Returns:
Returns status

Definition at line 90 of file obj.c.

PmReturn_t obj_print ( pPmObj_t  pobj,
uint8_t  marshallString 
)

Print an object, thereby using objects helpers.

Parameters:
pobjPtr to object for printing.
marshallStringOnly has influence on the way strings are printed. If 0, just output the string bytewise. Otherwise, surround with single quotes and escape unprintable characters.
Returns:
Return status

Definition at line 344 of file obj.c.

PmReturn_t obj_repr ( pPmObj_t  pobj,
pPmObj_t r_pstr 
)

Returns by reference a string object that is the human-readable representation of the object.

Used by the backtick operation (UNARY_CONVERT).

Parameters:
pobjPtr to object to represent
r_pstrReturn arg, the string object
Returns:
Return status

Definition at line 469 of file obj.c.