X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=lcm%2Fosm_common%2Fmsgbase.py;h=25e8c8097a3c111de18418f1f39735cef402debc;hb=refs%2Fchanges%2F39%2F5839%2F5;hp=745df7f69e6d1eb5e173559e7d31f3dd5b70a921;hpb=0aef0dbb3c8b50426f31812e7f386dc9188823d2;p=osm%2FRO.git diff --git a/lcm/osm_common/msgbase.py b/lcm/osm_common/msgbase.py index 745df7f6..25e8c809 100644 --- a/lcm/osm_common/msgbase.py +++ b/lcm/osm_common/msgbase.py @@ -1,6 +1,9 @@ +import asyncio from http import HTTPStatus +__author__ = "Alfonso Tierno " + class MsgException(Exception): """ @@ -14,7 +17,7 @@ class MsgException(Exception): :param http_code: type. It contains ".value" (http error code) and ".name" (http error name """ self.http_code = http_code - Exception.__init__(self, message) + Exception.__init__(self, "messaging exception " + message) class MsgBase(object): @@ -28,12 +31,17 @@ class MsgBase(object): def connect(self, config): pass - def write(self, msg): + def disconnect(self): pass - def read(self): + def write(self, topic, key, msg): pass - def disconnect(self): + def read(self, topic): pass + async def aiowrite(self, topic, key, msg, loop): + pass + + async def aioread(self, topic, loop): + pass