Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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_isFalse | ( | pPmObj_t | pobj ) |
| PmReturn_t obj_isIn | ( | pPmObj_t | pobj, |
| pPmObj_t | pitem | ||
| ) |
| 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:
-
memspace memory space/type paddr ptr to ptr to obj return by reference: paddr pts to first byte after obj r_pobj Return arg, the loaded object.
- Returns:
- Return status
| PmReturn_t obj_loadFromImgObj | ( | pPmObj_t | pimg, |
| pPmObj_t * | r_pobj | ||
| ) |
| PmReturn_t obj_print | ( | pPmObj_t | pobj, |
| uint8_t | marshallString | ||
| ) |
Print an object, thereby using objects helpers.
- Parameters:
-
pobj Ptr to object for printing. marshallString Only 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
| PmReturn_t obj_repr | ( | pPmObj_t | pobj, |
| pPmObj_t * | r_pstr | ||
| ) |
Generated on Tue Jul 12 2022 17:07:01 by
1.7.2