pyrokid_cxr_clientm.utils

com.rokid.cxr.client-m:1.0.9 - utils/ in Python

utils namespace contains LogUtil and ValueUtil

class pyrokid_cxr_clientm.utils.LogUtil[source]

Bases: object

com.rokid.cxr.client.utils.LogUtil Java class to Python

DEBUG: int = 2
ERROR: int = 5
INFO: int = 3
VERBOSE: int = 1
WARN: int = 4
static d(module: str, *args, **kwargs)[source]

debug level logging

static e(module: str, param1, *args, **kwargs)[source]

error level logging. When first parameter is an Exception, we’ll just print the tracktrace.

static getStackTrace(paramException: Exception) str[source]
static i(module: str, *args, **kwargs)[source]

info level logging

static setLogLevel(logLevel: int) None[source]

Sets the log level. But not really used, as logging module already handles logging level…

static v(module: str, *args, **kwargs)[source]

verbose level logging

static w(module: str, *args, **kwargs)[source]

warning level logging

class pyrokid_cxr_clientm.utils.ValueUtil[source]

Bases: object

com.rokid.cxr.client.utils.ValueUtil Java class to Python

class CxrBluetoothErrorCode(*values)[source]

Bases: IntEnum

com.rokid.cxr.client.utils.ValueUtil.CxrBluetoothErrorCode Java enum to Python

BLE_CONNECT_FAILED = -2
PARAM_INVALID = -1
SN_CHECK_FAILED = -4
SOCKET_CONNECT_FAILED = -3
SUCCEED = 0
UNKNOWN = -99
getErrorCode() int[source]
class CxrMediaType(*values)[source]

Bases: IntEnum

com.rokid.cxr.client.utils.ValueUtil.CxrMediaType Java enum to Python

ALL = 3

All files

AUDIO = 0

Audio files

PICTURE = 1

Picture files

VIDEO = 2

Video files

getType() int[source]
class CxrNotifyType(*values)[source]

Bases: IntEnum

com.rokid.cxr.client.utils.ValueUtil.CxrNotifyType Java enum to Python

NOTIFY = 1
REQUEST = 0
UNKNOWN = -1
getType() int[source]
class CxrSceneType(*values)[source]

Bases: StrEnum

com.rokid.cxr.client.utils.ValueUtil.CxrSceneType Java enum to Python

AI_CHAT = 'ai_chat'

Doesn’t do anything yet, just says: This feature is currently unavailable. Stay tuned

AUDIO_RECORD = 'audio_record'

Starts an audio recording

NAVIGATION = 'navigation'

Opens the navigation app

TRANSLATE = 'translate'

Opens the translator

VIDEO_RECORD = 'video_record'

Starts a video recording

WORD_TIPS = 'word_tips'

Opens the teleprompter

getSceneId() str[source]
class CxrSendErrorCode(*values)[source]

Bases: IntEnum

com.rokid.cxr.client.utils.ValueUtil.CxrSendErrorCode Java enum to Python

UNKNOWN = -99
getErrorCode() int[source]
class CxrStatus(*values)[source]

Bases: IntEnum

com.rokid.cxr.client.utils.ValueUtil.CxrStatus Java enum to Python. Note: I did add 10 to each group, so it does not think they’re duplicates, but 1.0.9 actually only has 0, -1 and -2 as values…

BLUETOOTH_AVAILABLE = 0
BLUETOOTH_INIT = -2
BLUETOOTH_UNAVAILABLE = -1
REQUEST_FAILED = -21
REQUEST_SUCCEED = 20
REQUEST_WAITING = -22
RESPONSE_INVALID = -31
RESPONSE_SUCCEED = 30
RESPONSE_TIMEOUT = -32
WIFI_AVAILABLE = 10
WIFI_INIT = -12
WIFI_UNAVAILABLE = -11
getStatus() int[source]
class CxrStreamType(*values)[source]

Bases: IntEnum

com.rokid.cxr.client.utils.ValueUtil.CxrStreamType Java enum to Python

WORD_TIPS = 1

Teleprompter text

getType() int[source]
class CxrWifiErrorCode(*values)[source]

Bases: IntEnum

com.rokid.cxr.client.utils.ValueUtil.CxrWifiErrorCode Java enum to Python

SUCCEED = 0
UNKNOWN = -99
WIFI_CONNECT_FAILED = -2
WIFI_DISABLED = -1
getErrorCode() int[source]