Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ersa::protocols::AmsMedia Struct Reference

#include <apple_media.h>

Public Member Functions

bool update (const uint8_t *bytes, size_t length)
 

Public Attributes

char title [32] {}
 
char artist [32] {}
 
bool playing {false}
 

Detailed Description

Decoded AMS media state independent from BLE transport and device hardware. A protocol adapter parses notifications into this value, then the companion source publishes a semantic media update. Keeping parsing here allows the exact same byte handling to run in host tests and in the firmware.

Member Function Documentation

◆ update()

bool ersa::protocols::AmsMedia::update ( const uint8_t *  bytes,
size_t  length 
)
inline

Apply one AMS Entity Update notification.

Parameters
bytesNotification payload beginning with entity/attribute IDs.
lengthNumber of valid bytes in bytes.
Returns
True only when a recognized supported field changed; false for incomplete, unsupported, or duplicate data. Strings are copied into bounded local buffers because BLE callback data is transient and must not be retained after the callback returns.

Member Data Documentation

◆ artist

char ersa::protocols::AmsMedia::artist[32] {}

Current artist name, truncated and null-terminated.

◆ playing

bool ersa::protocols::AmsMedia::playing {false}

Whether the player reports playback rather than paused/stopped state.

◆ title

char ersa::protocols::AmsMedia::title[32] {}

Current title, truncated and null-terminated to fixed embedded storage.


The documentation for this struct was generated from the following file: