mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
implement additional packet types
This commit is contained in:
parent
f2e56f3924
commit
581e159f0d
4 changed files with 159 additions and 13 deletions
|
|
@ -7,17 +7,17 @@ class Constants {
|
|||
|
||||
static CommandCodes = {
|
||||
AppStart: 1, // done
|
||||
SendTxtMsg: 2,
|
||||
SendTxtMsg: 2, // done
|
||||
SendChannelTxtMsg: 3,
|
||||
GetContacts: 4, // done
|
||||
GetDeviceTime: 5, // done
|
||||
SetDeviceTime: 6, // done
|
||||
SendSelfAdvert: 7, // done
|
||||
SetAdvertName: 8, // done
|
||||
AddUpdateContact: 9,
|
||||
AddUpdateContact: 9, // done
|
||||
SyncNextMessage: 10, // done
|
||||
SetRadioParams: 11,
|
||||
SetTxPower: 12,
|
||||
SetRadioParams: 11, // done
|
||||
SetTxPower: 12, // done
|
||||
}
|
||||
|
||||
static ResponseCodes = {
|
||||
|
|
@ -27,18 +27,25 @@ class Constants {
|
|||
Contact: 3, // done
|
||||
EndOfContacts: 4, // done
|
||||
SelfInfo: 5, // done
|
||||
Sent: 6,
|
||||
Sent: 6, // done
|
||||
ContactMsgRecv: 7, // done
|
||||
ChannelMsgRecv: 8,
|
||||
CurrTime: 9, // done
|
||||
NoMoreMessages: 10,
|
||||
NoMoreMessages: 10, // done
|
||||
}
|
||||
|
||||
static PushCodes = {
|
||||
Advert: 0x80,
|
||||
Advert: 0x80, // done
|
||||
PathUpdated: 0x81,
|
||||
SendConfirmed: 0x82,
|
||||
MsgWaiting: 0x83,
|
||||
SendConfirmed: 0x82, // done
|
||||
MsgWaiting: 0x83, // done
|
||||
}
|
||||
|
||||
static AdvType = {
|
||||
None: 0,
|
||||
Chat: 1,
|
||||
Repeater: 2,
|
||||
Room: 3,
|
||||
}
|
||||
|
||||
static SelfAdvertTypes = {
|
||||
|
|
@ -46,6 +53,12 @@ class Constants {
|
|||
Flood: 1,
|
||||
}
|
||||
|
||||
static TxtTypes = {
|
||||
Plain: 0,
|
||||
CliData: 1,
|
||||
SignedPlain: 2,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default Constants;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue