distributed: Add _getMsgName for verbose logging
This commit is contained in:
parent
39b1d67097
commit
b8c2b50c48
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
from direct.distributed.AstronInternalRepository import AstronInternalRepository
|
from direct.distributed.AstronInternalRepository import AstronInternalRepository
|
||||||
from direct.distributed.PyDatagram import *
|
from direct.distributed.PyDatagram import *
|
||||||
|
from direct.distributed.MsgTypes import *
|
||||||
|
from direct.showbase.PythonUtil import makeList
|
||||||
|
|
||||||
|
|
||||||
# TODO: Remove Astron dependence.
|
# TODO: Remove Astron dependence.
|
||||||
|
@ -41,3 +43,7 @@ class OTPInternalRepository(AstronInternalRepository):
|
||||||
dg.addUint16(fieldId)
|
dg.addUint16(fieldId)
|
||||||
|
|
||||||
self.send(dg)
|
self.send(dg)
|
||||||
|
|
||||||
|
def _getMsgName(self, msgId):
|
||||||
|
# TODO: Remove Astron dependence.
|
||||||
|
return makeList(MsgId2Names.get(msgId, f'UNKNOWN MESSAGE: {msgId}'))[0]
|
||||||
|
|
Loading…
Reference in a new issue