messages: do not use const()

pull/25/head
Jan Pochyla 8 years ago
parent 392538d7d2
commit 783fddf749

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class Address(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class ApplySettings(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class ButtonAck(p.MessageType):
MESSAGE_WIRE_TYPE = 27

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class ButtonRequest(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class Cancel(p.MessageType):
MESSAGE_WIRE_TYPE = 20

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class ChangePin(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class CipherKeyValue(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class CipheredKeyValue(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class ClearSession(p.MessageType):
MESSAGE_WIRE_TYPE = 24

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class CoinType(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class DebugLinkDecision(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class DebugLinkFlashErase(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class DebugLinkGetState(p.MessageType):
MESSAGE_WIRE_TYPE = 101

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class DebugLinkLog(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class DebugLinkMemory(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class DebugLinkMemoryRead(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class DebugLinkMemoryWrite(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .HDNodeType import HDNodeType
class DebugLinkState(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class DebugLinkStop(p.MessageType):
MESSAGE_WIRE_TYPE = 103

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class DecryptMessage(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class DecryptedMessage(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class ECDHSessionKey(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class EncryptMessage(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class EncryptedMessage(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class Entropy(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class EntropyAck(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class EntropyRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 35

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class EstimateTxSize(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class EthereumAddress(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class EthereumGetAddress(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class EthereumSignTx(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class EthereumTxAck(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class EthereumTxRequest(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class Failure(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .CoinType import CoinType
class Features(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class FirmwareErase(p.MessageType):
MESSAGE_WIRE_TYPE = 6

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class FirmwareUpload(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .MultisigRedeemScriptType import MultisigRedeemScriptType
class GetAddress(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .IdentityType import IdentityType
class GetECDHSessionKey(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class GetEntropy(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class GetFeatures(p.MessageType):
MESSAGE_WIRE_TYPE = 55

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class GetPublicKey(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .HDNodeType import HDNodeType
class HDNodePathType(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class HDNodeType(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class IdentityType(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class Initialize(p.MessageType):
MESSAGE_WIRE_TYPE = 0

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .HDNodeType import HDNodeType
class LoadDevice(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class MessageSignature(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .HDNodePathType import HDNodePathType
class MultisigRedeemScriptType(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class PassphraseAck(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class PassphraseRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 41

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class PinMatrixAck(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class PinMatrixRequest(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class Ping(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .HDNodeType import HDNodeType
class PublicKey(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class RecoveryDevice(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class ResetDevice(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class SetU2FCounter(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .IdentityType import IdentityType
class SignIdentity(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class SignMessage(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class SignTx(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class SignedIdentity(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .TxInputType import TxInputType
from .TxOutputType import TxOutputType
from .TransactionType import TransactionType

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .HDNodeType import HDNodeType
class Storage(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class Success(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .TxInputType import TxInputType
from .TxOutputBinType import TxOutputBinType
from .TxOutputType import TxOutputType

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .TransactionType import TransactionType
class TxAck(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .MultisigRedeemScriptType import MultisigRedeemScriptType
class TxInputType(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class TxOutputBinType(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .MultisigRedeemScriptType import MultisigRedeemScriptType
class TxOutputType(p.MessageType):

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
from .TxRequestDetailsType import TxRequestDetailsType
from .TxRequestSerializedType import TxRequestSerializedType

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class TxRequestDetailsType(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class TxRequestSerializedType(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class TxSize(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class VerifyMessage(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class WipeDevice(p.MessageType):
MESSAGE_WIRE_TYPE = 5

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class WordAck(p.MessageType):
FIELDS = {

@ -1,6 +1,5 @@
# Automatically generated by pb2py
import protobuf as p
from micropython import const
class WordRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 46

@ -1,66 +1,66 @@
WordRequest = const(46)
DebugLinkMemoryWrite = const(112)
ButtonAck = const(27)
MessageSignature = const(40)
EthereumAddress = const(57)
EthereumTxAck = const(60)
Ping = const(1)
EncryptedMessage = const(50)
DebugLinkStop = const(103)
EstimateTxSize = const(43)
GetPublicKey = const(11)
GetFeatures = const(55)
GetECDHSessionKey = const(61)
PinMatrixRequest = const(18)
ClearSession = const(24)
LoadDevice = const(13)
VerifyMessage = const(39)
EthereumSignTx = const(58)
PassphraseRequest = const(41)
TxAck = const(22)
ChangePin = const(4)
DebugLinkLog = const(104)
FirmwareErase = const(6)
TxRequest = const(21)
EthereumGetAddress = const(56)
DebugLinkState = const(102)
EthereumTxRequest = const(59)
FirmwareUpload = const(7)
SignedIdentity = const(54)
Failure = const(3)
EntropyRequest = const(35)
ApplySettings = const(25)
DebugLinkFlashErase = const(113)
Address = const(30)
Initialize = const(0)
PinMatrixAck = const(19)
SetU2FCounter = const(63)
SignTx = const(15)
DebugLinkGetState = const(101)
Success = const(2)
ResetDevice = const(14)
WordAck = const(47)
SimpleSignTx = const(16)
GetAddress = const(29)
TxSize = const(44)
PassphraseAck = const(42)
SignMessage = const(38)
DecryptedMessage = const(52)
DecryptMessage = const(51)
GetEntropy = const(9)
EntropyAck = const(36)
WipeDevice = const(5)
CipherKeyValue = const(23)
Features = const(17)
RecoveryDevice = const(45)
SignIdentity = const(53)
DebugLinkDecision = const(100)
CipheredKeyValue = const(48)
ButtonRequest = const(26)
PublicKey = const(12)
DebugLinkMemory = const(111)
Entropy = const(10)
Cancel = const(20)
DebugLinkMemoryRead = const(110)
EncryptMessage = const(49)
ECDHSessionKey = const(62)
WordRequest = 46
DebugLinkMemoryWrite = 112
ButtonAck = 27
MessageSignature = 40
EthereumAddress = 57
EthereumTxAck = 60
Ping = 1
EncryptedMessage = 50
DebugLinkStop = 103
EstimateTxSize = 43
GetPublicKey = 11
GetFeatures = 55
GetECDHSessionKey = 61
PinMatrixRequest = 18
ClearSession = 24
LoadDevice = 13
VerifyMessage = 39
EthereumSignTx = 58
PassphraseRequest = 41
TxAck = 22
ChangePin = 4
DebugLinkLog = 104
FirmwareErase = 6
TxRequest = 21
EthereumGetAddress = 56
DebugLinkState = 102
EthereumTxRequest = 59
FirmwareUpload = 7
SignedIdentity = 54
Failure = 3
EntropyRequest = 35
ApplySettings = 25
DebugLinkFlashErase = 113
Address = 30
Initialize = 0
PinMatrixAck = 19
SetU2FCounter = 63
SignTx = 15
DebugLinkGetState = 101
Success = 2
ResetDevice = 14
WordAck = 47
SimpleSignTx = 16
GetAddress = 29
TxSize = 44
PassphraseAck = 42
SignMessage = 38
DecryptedMessage = 52
DecryptMessage = 51
GetEntropy = 9
EntropyAck = 36
WipeDevice = 5
CipherKeyValue = 23
Features = 17
RecoveryDevice = 45
SignIdentity = 53
DebugLinkDecision = 100
CipheredKeyValue = 48
ButtonRequest = 26
PublicKey = 12
DebugLinkMemory = 111
Entropy = 10
Cancel = 20
DebugLinkMemoryRead = 110
EncryptMessage = 49
ECDHSessionKey = 62

@ -9,7 +9,7 @@ from google.protobuf.internal.enum_type_wrapper import EnumTypeWrapper
def process_type(t, cls, msg_id, indexfile):
print(" * type %s" % t)
imports = ["import protobuf as p", "from micropython import const", ]
imports = ["import protobuf as p", ]
out = ["", "class %s(p.MessageType):" % t, ]
@ -85,7 +85,7 @@ def process_type(t, cls, msg_id, indexfile):
if msg_id is not None:
out.append(" MESSAGE_WIRE_TYPE = %d" % msg_id)
if indexfile is not None:
indexfile.write("%s = const(%d)\n" % (t, msg_id))
indexfile.write("%s = %d\n" % (t, msg_id))
return imports + out

Loading…
Cancel
Save