forked from microbit-more/pxt-mbit-more-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shims.d.ts
65 lines (55 loc) · 2 KB
/
shims.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Auto-generated. Do not edit.
//% color=#FF9900 weight=95 icon="\uf1b0"
declare namespace MbitMore {
/**
* @brief Start Microbit More service.
*
*/
//% shim=MbitMore::startMbitMoreService
function startMbitMoreService(): void;
/**
* @brief Register a label in waiting data list and return an ID for the label.
* This starts Microbit More service if it was not available.
*
* @param dataLabel label to register
* @param dataType type of the data to be received
* @return int ID for the label
*/
//% shim=MbitMore::call_registerWaitingDataLabel
function call_registerWaitingDataLabel(dataLabel: string, dataType: MbitMoreDataContentType): int32;
/**
* @brief Get number which was received with the label.
*
* @param labelID ID in registered labels
* @return float received data with the label
*/
//% shim=MbitMore::call_dataContentAsNumber
function call_dataContentAsNumber(labelID: int32): number;
/**
* @brief Get text which was received with the label.
*
* @param labelID ID in registered labels
* @return String received data with the label
*/
//% shim=MbitMore::call_dataContentAsText
function call_dataContentAsText(labelID: int32): string;
/**
* @brief Send a float with labele to Scratch.
* Do nothing if Scratch was not connected.
*
* @param dataLabel - label of the data
* @param dataContent - content of the data
*/
//% shim=MbitMore::call_sendNumberWithLabel
function call_sendNumberWithLabel(dataLabel: string, dataContent: number): void;
/**
* @brief Send a text with label to Scratch.
* Do nothing if Scratch was not connected.
*
* @param dataLabel - label of the data
* @param dataContent - content of the data
*/
//% shim=MbitMore::call_sendTextWithLabel
function call_sendTextWithLabel(dataLabel: string, dataContent: string): void;
}
// Auto-generated. Do not edit. Really.