RDK Documentation (Open Sourced RDK Components)
|
Data Structures | |
struct | _MOTION_EVENT |
struct | _JSON_EVENT |
struct | _SPEECH_EVENT |
union | _SPEECH_EVENT.data |
struct | _SPEECH_END_EVENT.data.end |
struct | _SPEECH_FRAGMENT_EVENT.data.fragment |
struct | _SPEECH_BEGIN_EVENT.data.begin |
struct | _IARM_BUS_VREXMgr_EventData_t |
union | _IARM_BUS_VREXMgr_EventData_t.data |
class | JSONParser |
struct | AudioInfo |
struct | MotionInfo |
class | VREXSession |
Macros | |
#define | IARM_BUS_VREXMGR_NAME "VREXMgr" |
#define | IARM_BUS_VREXMGR_SPEECH_FRAGMENTLENGTH 1024 |
#define | IARM_BUS_VREXMGR_SPEECH_MIME_LENGTH 64 |
#define | IARM_BUS_VREXMGR_SPEECH_SUBTYPE_LENGTH 64 |
#define | IARM_BUS_VREXMGR_SPEECH_LANG_LENGTH 3 |
#define | IARM_BUS_VREXMGR_ERROR_MESSAGE_LENGTH 256 |
#define | IARM_BUS_VREXMGR_API_AnnounceFirmware "AnnounceFirmware" |
#define | INT_LOG(...) printf(__VA_ARGS__) |
#define | LOG(...) INT_LOG("VREXMGR: " __VA_ARGS__) |
#define | STATUS_LOG(...) LOG("IARMSTATUS: " __VA_ARGS__) |
#define | VERSION_TXT_FILE "/version.txt" |
#define | VERSION_TXT_IMAGENAME "imagename:" |
#define | MIN(a, b) (((a)<(b))?(a):(b)) |
#define | MAX_IARMSTATUS_COUNT_LENGTH 10 |
#define | TEMP_BUFFER_SIZE 20 |
#define | DEFAULT_VREX_TIMEOUT 30 |
Typedefs | |
typedef enum _VREXMgr_EventId_t | IARM_Bus_VREXMgr_EventId_t |
typedef enum _VREXMgr_SpeechType | IARM_Bus_VREXMgr_SpeechType_t |
typedef enum _VREXMgr_SpeechEndReason | IARM_Bus_VREXMgr_SpeechEndReason_t |
typedef enum _VREXMgr_VoiceCallType | IARM_Bus_VREXMgr_VoiceCallType_t |
typedef struct _IARM_BUS_VREXMgr_EventData_t | IARM_Bus_VREXMgr_EventData_t |
typedef enum _VREXMgr_CARD_FWDNLDState_t | IARM_Bus_VREXMGR_FWDNLDState_t |
Enumerations | |
enum | _VREXMgr_EventId_t |
enum | _VREXMgr_SpeechType |
enum | _VREXMgr_SpeechEndReason |
enum | _VREXMgr_VoiceCallType |
enum | _VREXMgr_CARD_FWDNLDState_t |
enum | AudioStreamEndReason |
enum | SendState |
Functions | |
IARM_Result_t | IARMSTATUS_Start (void) |
IARM_Result_t | IARMSTATUS_Stop (void) |
void | IARMSTATUS_keyEventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len) |
uint32_t | get_status_kill_count () |
unsigned char | get_battery_level_loaded (unsigned char remoteId) |
static int | parse_null (void *ctx) |
static int | parse_boolean (void *ctx, int boolean) |
static int | parse_number (void *ctx, const char *s, size_t l) |
static int | parse_string (void *ctx, const unsigned char *stringVal, size_t stringLen) |
static int | parse_map_key (void *ctx, const unsigned char *stringVal, size_t stringLen) |
static int | parse_start_map (void *ctx) |
static int | parse_end_map (void *ctx) |
static int | parse_start_array (void *ctx) |
static int | parse_end_array (void *ctx) |
IARM_Result_t | IARM_Bus_Call (const char *ownerName, const char *methodName, void *arg, size_t argLen) |
This API is used to Invoke RPC method by its application name and method name. More... | |
int | main (int argc, char *argv[]) |
static void | _vrexEventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len) |
static void | _pairEventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len) |
static void | _keyEventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len) |
static bool | _sessionExists (unsigned char remoteId) |
static void | _updateSessionTimeout (unsigned char remoteId) |
static bool | _loadReceiverId () |
static bool | _getSTBName () |
static void | _configureRemotesToWatch () |
static void | _loadConfiguration () |
static bool | is_powered_on (void) |
static IARM_Result_t | _PowerPreChange (void *arg) |
IARM_Result_t | VREXMgr_Start () |
IARM_Result_t | VREXMgr_Loop (void) |
Listens for component specific events from drivers. More... | |
IARM_Result_t | VREXMgr_Stop (void) |
Terminates the Sys manager. More... | |
static bool | _fileExists (string fileName) |
static void | handleSettingsFromServer (const char *jsonData) |
static void * | speechServerThread (void *session) |
static size_t | voice_writeData (void *buffer, size_t size, size_t nmemb, void *userData) |
static size_t | kk_writeData (void *buffer, size_t size, size_t nmemb, void *userData) |
static size_t | sendState_writeData (void *buffer, size_t size, size_t nmemb, void *userData) |
static size_t | read_chunked_socket_callback (void *buffer, size_t size, size_t nmemb, void *userData) |
m_remoteId (remoteId) | |
m_receiverId (receiverId) | |
m_appId (appId) | |
m_stbName (stbName) | |
m_defaultConversationLength (defaultConversationLength) | |
m_conversationExpires (std::time(0) -200) | |
m_curlInitialized (false) | |
m_logMetrics (true) | |
m_baseRoute (route) | |
m_serverSocket (0) | |
m_dataReadThread (NULL) | |
m_aspect_ratio (aspect_ratio) | |
m_guideLanguage (language) | |
if (rfStatus->bindRemotes[bindRemotesIndex].ShortAddress !=0xFFFF) | |
void | VREXSession::changeServerDetails (string route, string aspect_ratio, string language) |
bool | VREXSession::onMotion (MotionInfo) |
void | VREXSession::notifySuccess () |
void | VREXSession::notifyError (long httpErrorCode, long curlErrorCode, long vrexErrorCode, long rfErrorCode, const char *message, IARM_Bus_VREXMgr_VoiceCallType_t from) |
void | VREXSession::safe_copy (unsigned char *dst, const char *src, size_t len) |
void | VREXSession::addKKResponse (string responseData) |
void | VREXSession::addSpeechResponse (string responseData) |
void | VREXSession::addSendStateResponse (string responseData) |
bool | VREXSession::onStreamStart (AudioInfo audioInfo) |
void | VREXSession::onStreamData (void *src, size_t size) |
void | VREXSession::onStreamEnd (AudioStreamEndReason) |
void | VREXSession::updateExpiration (int expirationWindow) |
bool | VREXSession::sendState (SendState state) |
size_t | VREXSession::serverSocketCallback (void *buffer, size_t size, size_t nmemb) |
void | VREXSession::startTransferServer () |
char * | VREXSession::getRequestMetrics (CURL *curl, char *) |
string | VREXSession::getPostFieldString () |
string | VREXSession::getUserAgentString () |
Variables | |
static yajl_callbacks | callbacks |
static int | count |
static pthread_mutex_t | tMutexLock |
static int | currentPowerMode = 0 |
static volatile int | initialized = 0 |
static volatile bool | bVoiceControl =true |
string | guideLanguage ="" |
string | aspect_ratio ="" |
map< unsigned char, VREXSession > | remotes |
static string | receiverId |
static string | stbName |
static string | defaultRemoteName = "XR11-20" |
static string | defaultRoute = "https://vrex.g.comcast.net/vsp/v1/" |
static int | defaultConversationLength = 180 |
static int | defaultExpirationWindow = 60 |
static pthread_mutex_t | power_save_mutex |
char | tempBuffer [20] |
struct _MOTION_EVENT |
struct _JSON_EVENT |
struct _SPEECH_EVENT |
union _SPEECH_EVENT.data |
struct _SPEECH_EVENT::_SPEECH_END_EVENT.data.end |
struct _SPEECH_EVENT::_SPEECH_FRAGMENT_EVENT.data.fragment |
struct _SPEECH_EVENT::_SPEECH_BEGIN_EVENT.data.begin |
Data Fields | ||
---|---|---|
unsigned char | mimeType[64] | The mime type of the data audio/vnd.wave;codec=1 for PCM or audio/x-adpcm for ADPCM see http://www.isi.edu/in-notes/rfc2361.txt wrt mime types. |
unsigned char | subType[64] | The subtype (using exising definitions such as PCM_16_16K, PCM_16_32K, PCM_16_22K) |
unsigned char | language[3] | The language code (ISO-639-1) |
struct _IARM_BUS_VREXMgr_EventData_t |
Data Fields | ||
---|---|---|
unsigned char | remoteId | A unique identifier of the remote that transmitted the motion command. |
union _IARM_BUS_VREXMgr_EventData_t | data |
union _IARM_BUS_VREXMgr_EventData_t.data |
Data Fields | ||
---|---|---|
_MOTION_EVENT | motionEvent | |
_SPEECH_EVENT | speechEvent | |
_JSON_EVENT | jsonEvent |
class JSONParser |
Definition at line 43 of file jsonParser.h.
Public Member Functions | |
map< string, varVal * > | parse (const unsigned char *) |
void | newKey (string keyName) |
void | newString (string value) |
void | newNull () |
void | newBool (bool value) |
void | newArray () |
void | endArray () |
map< string, varVal * > | parse (const unsigned char *) |
void | newKey (string keyName) |
void | newString (string value) |
void | newNull () |
void | newBool (bool value) |
void | newArray () |
void | endArray () |
Private Attributes | |
string | m_curKey |
map< string, varVal * > | m_dict |
stack< list< varVal * > * > | m_arrays |
list< varVal * > * | m_array |
struct AudioInfo |
Definition at line 849 of file deviceUpdateMgrMain.cpp.
Data Fields | ||
---|---|---|
string | mimeType | |
string | subType | |
string | language |
struct MotionInfo |
Definition at line 61 of file vrexSession.h.
Data Fields | ||
---|---|---|
double | x | |
double | y | |
double | z |
class VREXSession |
Definition at line 82 of file vrexSession.h.
Public Member Functions | |
bool | onMotion (MotionInfo) |
bool | onStreamStart (AudioInfo audioInfo) |
void | onStreamData (void *src, size_t size) |
void | onStreamEnd (AudioStreamEndReason) |
bool | sendState (SendState state) |
void | updateExpiration (int expirationWindow) |
void | startTransferServer () |
size_t | serverSocketCallback (void *buffer, size_t size, size_t nmemb) |
void | addKKResponse (string responseData) |
void | addSpeechResponse (string responseData) |
void | addSendStateResponse (string responseData) |
void | changeServerDetails (string route, string aspect_ratio, string language) |
Private Member Functions | |
char * | getRequestMetrics (CURL *curl, char *) |
void | notifySuccess () |
void | notifyError (long httpErrorCode, long curlErrorCode, long vrexErrorCode, long rfErrorCode, const char *message, IARM_Bus_VREXMgr_VoiceCallType_t from) |
void | safe_copy (unsigned char *dst, const char *src, size_t len) |
void | getDynamicStbAndRemoteinfo () |
string | getPostFieldString () |
string | getUserAgentString () |
Private Attributes | |
string | m_userId |
string | m_appId |
string | m_receiverId |
string | m_rf4ceMacAddress |
string | m_remoteBatteryVoltage |
string | m_iArmStatusKillCount |
string | m_rdkImage |
string | m_remoteType |
string | m_remoteSoftwareVersion |
string | m_remoteHardwareVersion |
string | m_stbName |
string | m_conversationId |
string | m_baseRoute |
string | m_aspect_ratio |
string | m_guideLanguage |
unsigned char | m_remoteId |
int | m_defaultConversationLength |
time_t | m_conversationExpires |
AudioInfo | m_audioInfo |
bool | m_curlInitialized |
bool | m_logMetrics |
string | m_kkResponse |
string | m_sendStateResponse |
string | m_speechResponse |
string | m_serverSocketName |
int | m_serverSocket |
int | m_clientSocket |
pthread_t | m_dataReadThread |
pthread_cond_t | m_cond |
pthread_mutex_t | m_mutex |
map< string, JSONParser::varVal * > | m_parameters |
map< string, JSONParser::varVal * > | m_speechResults |
map< SendState, string > | m_sendStates |
#define IARM_BUS_VREXMGR_NAME "VREXMgr" |
typedef enum _VREXMgr_EventId_t IARM_Bus_VREXMgr_EventId_t |
Published Events from sys manager
typedef struct _IARM_BUS_VREXMgr_EventData_t IARM_Bus_VREXMgr_EventData_t |
Event Data associated with Sys Managers
Possible Firmware Download state
enum _VREXMgr_EventId_t |
IARM_Result_t IARM_Bus_Call | ( | const char * | ownerName, |
const char * | methodName, | ||
void * | arg, | ||
size_t | argLen | ||
) |
This API is used to Invoke RPC method by its application name and method name.
[in] | ownerName | well-known name of the application that publish the RPC call. |
[in] | methodName | well-known name of the RPC method. |
[in] | arg | It is the data structure holding input & output parameters of the invocation. |
[in] | argLen | The size of the data pointed by arg parameter. |
IARM_RESULT_SUCCESS | Indicates the call was successful. |
IARM_RESULT_INVALID_PARAM | Indicates invalid input parameter. |
IARM_RESULT_INVALID_STATE | Indicates the IARM_Bus was either not initialised nor connected. |
IARM_RESULT_IPCCORE_FAIL | Indicates failure of the underlying IPC. |
IARM_RESULT_OOM | Indicates failure to allocate memory. |
Definition at line 57 of file iarm_bus.c.
|
static |
Set the state of the logger based on the power state events
Definition at line 1027 of file vrexMgr.cpp.
IARM_Result_t VREXMgr_Loop | ( | void | ) |
Listens for component specific events from drivers.
Definition at line 266 of file vrexMgr.cpp.
IARM_Result_t VREXMgr_Stop | ( | void | ) |
Terminates the Sys manager.
This function disconnects Sys Manager from the iarm bus and terminates it.
Definition at line 285 of file vrexMgr.cpp.
|
static |
Definition at line 138 of file jsonParser.cpp.