API Reference | developer.brewmp.com API Reference | developer.brewmp.com

Developer

API Reference

ILOGGER_PUTITEM()

Brew Release
Brew MP 1.0.2
Description
This function is called to send a prioritized user-defined binary message.
Here are the steps to define a user log item type: 1. Choose a user item number and define a meaningful name to it, ie: #define MY_APPS_LOG_ITEM_TYPE AEE_LOG_TYPE_USER_1 2. Define a structure that corresponds to you're new type, ie:
            typedef struct{
               uint8    foo1;
               uint32   foo2;
               uint8    fooString[ STRING_SIZE ];
            } myAppsItem;
3. Enable the PC software that will be reading the logging output to recognize the log item type AEE_LOG_TYPE_USER_1 ( which in this case is MY_APPS_LOT_ITEM_TYPE ) 4. Call ILOGGER_PutItem() with MY_APPS_LOT_ITEM_TYPE, a pointer to an instance of myAppsItem, and the size of myAppsItem.
Params
pMe
[]:
Pointer to the ILogger object
bucket
[]:
Bucket to place item
type
[]:
User defined item type
nSize
[]:
Size of type in bytes
pItem
[]:
Pointer to instance of type
Interface
  • ILOGGER
Prototype
  •    int ILOGGER_PutItem( ILogger *pMe, 
                            AEELogBucketType bucket, 
                            AEELogItemType type, 
                            uint16 nSize,
                            uint8 *pItem )
    
Return
  • SUCCESS: Log sent successfully EBADPARM: Invalid pointer to pItem or size equal to zero EUNSUPPORTED: Log item filtered ENOMEMORY: Unable to allocate required memory EFAILED: Log not sent
    -- The following log codes only apply to file logging

    EFSFULL: Not enough space in log file for this packet EFILENOEXISTS: Output log file is closed
Side Effect
  • None
Comments
None