C# Class Kreyos.SDK.Bluetooth.Protocol

Afficher le fichier Open project: kreyosopensource/KreyosWP

Méthodes publiques

Méthode Description
LoadDataFile ( String fileName ) : Task
LoadDataFromBuffer ( byte buffer ) : ActivityDataDoc
Protocol ( BluetoothAgent btAgent ) : System
activityHeartbeat ( string activityId ) : void
buildSyncTimePack ( ) : byte[]
buildSyncTimePackFromInput ( System.DateTime p_date ) : byte[]
buildWatchConfig ( String worldClocks, int worldClockOffset, bool isDigitalClock, int digitalClock, int analogClock, int sportsGrid, int sportsGrids, int goals, int weight, int height, bool enableGesture, bool isLeftHandGesture, int gestureActionsTable, bool isUkUnit ) : byte[]
bytesToInt ( byte buf, int start ) : int
bytesToShort ( byte buf, int start ) : int
deleteFile ( string fileName ) : void
echo ( string hint ) : void
getActivityData ( ) : void
getDeviceID ( ) : void
getSportsData ( ) : void
getSportsGrid ( ) : void
handlePacket ( byte packet ) : void
handle_activity ( byte pack, int handle ) : void
handle_file ( byte pack, int handle ) : void
handle_today_activity ( byte pack, int handle ) : void
intToByteArray ( int i ) : byte[]
listFile ( string prefix ) : void
longToByteArray ( long s ) : byte[]
notifyMessage ( string type, string identity, string message ) : void
readFile ( string filename ) : void
sendDailyActivityRequest ( ) : void
sendGPSInfo ( Geoposition geoPosition, int distance, int calories ) : void
sendGPSInfo ( short spd, short alt, int distance, int calories ) : void
sendStream ( string name, Stream stream ) : bool
sendStream ( string name, StreamReader sr ) : bool
setGestureControl ( bool enable, bool isLeftHand, int action_map ) : void
setWatchAlarm ( int index, int mode, int monthday, int weekday, int hour, int minute ) : void
setWatchGrid ( ) : void
shortToByteArray ( short s ) : byte[]
syncTime ( ) : void
syncTimeFromInput ( System.DateTime p_date ) : void
syncWatchConfig ( String worldClocks, int worldClockOffset, bool isDigitalClock, int digitalClock, int analogClock, int sportsGrid, int sportsGrids, int goals, int weight, int height, bool enableGesture, bool isLeftHandGesture, int gestureActionsTable, bool isUkUnit ) : void
unlockWatch ( ) : void

Private Methods

Méthode Description
GET_PACKET_END ( byte pack ) : int
GetValue ( int rawValue, ActivityDataRow dtype ) : double
LoadData ( DataReader reader ) : ActivityDataDoc
buildDataBuffer ( List buflist ) : byte[]
buildElement ( byte packet, int offset, string type, byte data ) : int
buildElementHead ( byte packet, int offset, string type, byte len ) : int
buildPacketHead ( byte packet ) : int
buildSingleElementPacket ( string type, byte data ) : byte[]
estimateElementHeadSize ( string type ) : int
estimateStringSize ( string type ) : int
fillElementData ( byte packet, int offset, byte data, int from, int len ) : int
get_body_length ( byte pack ) : int
get_element_data ( byte pack, int handle ) : byte[]
get_element_data_size ( byte pack, int handle ) : int
get_element_type ( byte pack, int handle ) : byte[]
get_first_element ( byte pack ) : int
get_first_sub_element ( byte pack, int parent ) : int
get_flag ( byte pack ) : int
get_next_element ( byte pack, int handle ) : int
get_next_sub_element ( byte pack, int parent, int handle ) : int
get_sequence ( byte pack ) : int
get_version ( byte pack ) : int
hexdump ( byte buffer ) : void
sendFileBuffer ( string fileName, byte buffer, int fileLen ) : bool

Method Details

LoadDataFile() public méthode

public LoadDataFile ( String fileName ) : Task
fileName String
Résultat Task

LoadDataFromBuffer() public méthode

public LoadDataFromBuffer ( byte buffer ) : ActivityDataDoc
buffer byte
Résultat ActivityDataDoc

Protocol() public méthode

public Protocol ( BluetoothAgent btAgent ) : System
btAgent BluetoothAgent
Résultat System

activityHeartbeat() public méthode

public activityHeartbeat ( string activityId ) : void
activityId string
Résultat void

buildSyncTimePack() public méthode

public buildSyncTimePack ( ) : byte[]
Résultat byte[]

buildSyncTimePackFromInput() public méthode

public buildSyncTimePackFromInput ( System.DateTime p_date ) : byte[]
p_date System.DateTime
Résultat byte[]

buildWatchConfig() public méthode

public buildWatchConfig ( String worldClocks, int worldClockOffset, bool isDigitalClock, int digitalClock, int analogClock, int sportsGrid, int sportsGrids, int goals, int weight, int height, bool enableGesture, bool isLeftHandGesture, int gestureActionsTable, bool isUkUnit ) : byte[]
worldClocks String
worldClockOffset int
isDigitalClock bool
digitalClock int
analogClock int
sportsGrid int
sportsGrids int
goals int
weight int
height int
enableGesture bool
isLeftHandGesture bool
gestureActionsTable int
isUkUnit bool
Résultat byte[]

bytesToInt() public static méthode

public static bytesToInt ( byte buf, int start ) : int
buf byte
start int
Résultat int

bytesToShort() public static méthode

public static bytesToShort ( byte buf, int start ) : int
buf byte
start int
Résultat int

deleteFile() public méthode

public deleteFile ( string fileName ) : void
fileName string
Résultat void

echo() public méthode

public echo ( string hint ) : void
hint string
Résultat void

getActivityData() public méthode

public getActivityData ( ) : void
Résultat void

getDeviceID() public méthode

public getDeviceID ( ) : void
Résultat void

getSportsData() public méthode

public getSportsData ( ) : void
Résultat void

getSportsGrid() public méthode

public getSportsGrid ( ) : void
Résultat void

handlePacket() public méthode

public handlePacket ( byte packet ) : void
packet byte
Résultat void

handle_activity() public méthode

public handle_activity ( byte pack, int handle ) : void
pack byte
handle int
Résultat void

handle_file() public méthode

public handle_file ( byte pack, int handle ) : void
pack byte
handle int
Résultat void

handle_today_activity() public méthode

public handle_today_activity ( byte pack, int handle ) : void
pack byte
handle int
Résultat void

intToByteArray() public static méthode

public static intToByteArray ( int i ) : byte[]
i int
Résultat byte[]

listFile() public méthode

public listFile ( string prefix ) : void
prefix string
Résultat void

longToByteArray() public static méthode

public static longToByteArray ( long s ) : byte[]
s long
Résultat byte[]

notifyMessage() public méthode

public notifyMessage ( string type, string identity, string message ) : void
type string
identity string
message string
Résultat void

readFile() public méthode

public readFile ( string filename ) : void
filename string
Résultat void

sendDailyActivityRequest() public méthode

public sendDailyActivityRequest ( ) : void
Résultat void

sendGPSInfo() public méthode

public sendGPSInfo ( Geoposition geoPosition, int distance, int calories ) : void
geoPosition Windows.Devices.Geolocation.Geoposition
distance int
calories int
Résultat void

sendGPSInfo() public méthode

public sendGPSInfo ( short spd, short alt, int distance, int calories ) : void
spd short
alt short
distance int
calories int
Résultat void

sendStream() public méthode

public sendStream ( string name, Stream stream ) : bool
name string
stream Stream
Résultat bool

sendStream() public méthode

public sendStream ( string name, StreamReader sr ) : bool
name string
sr System.IO.StreamReader
Résultat bool

setGestureControl() public méthode

public setGestureControl ( bool enable, bool isLeftHand, int action_map ) : void
enable bool
isLeftHand bool
action_map int
Résultat void

setWatchAlarm() public méthode

public setWatchAlarm ( int index, int mode, int monthday, int weekday, int hour, int minute ) : void
index int
mode int
monthday int
weekday int
hour int
minute int
Résultat void

setWatchGrid() public méthode

public setWatchGrid ( ) : void
Résultat void

shortToByteArray() public static méthode

public static shortToByteArray ( short s ) : byte[]
s short
Résultat byte[]

syncTime() public méthode

public syncTime ( ) : void
Résultat void

syncTimeFromInput() public méthode

public syncTimeFromInput ( System.DateTime p_date ) : void
p_date System.DateTime
Résultat void

syncWatchConfig() public méthode

public syncWatchConfig ( String worldClocks, int worldClockOffset, bool isDigitalClock, int digitalClock, int analogClock, int sportsGrid, int sportsGrids, int goals, int weight, int height, bool enableGesture, bool isLeftHandGesture, int gestureActionsTable, bool isUkUnit ) : void
worldClocks String
worldClockOffset int
isDigitalClock bool
digitalClock int
analogClock int
sportsGrid int
sportsGrids int
goals int
weight int
height int
enableGesture bool
isLeftHandGesture bool
gestureActionsTable int
isUkUnit bool
Résultat void

unlockWatch() public méthode

public unlockWatch ( ) : void
Résultat void