Skip to content

Commit

Permalink
New BER naming
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Mar 21, 2020
1 parent 5871a2a commit 4cee8ab
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions format/src/ber_c/__init__.py
Expand Up @@ -37,5 +37,5 @@
from . import exceptions
from . import system

from .exceptions import BerException, PackingError, UnpackingError, OperationNotImplemented
from .system import Ber
from .exceptions import BERException, PackingError, UnpackingError, OperationNotImplemented
from .system import BER
16 changes: 8 additions & 8 deletions format/src/ber_c/exceptions.py
Expand Up @@ -39,15 +39,15 @@

import colony

class BerException(colony.ColonyException):
class BERException(colony.ColonyException):
"""
The ber exception class.
The BER exception class.
"""

message = None
""" The exception's message """

class PackingError(BerException):
class PackingError(BERException):
"""
The packing error class.
"""
Expand All @@ -60,7 +60,7 @@ def __init__(self, message):
:param message: The message to be printed.
"""

BerException.__init__(self)
BERException.__init__(self)
self.message = message

def __str__(self):
Expand All @@ -73,7 +73,7 @@ def __str__(self):

return "Packing error - %s" % self.message

class UnpackingError(BerException):
class UnpackingError(BERException):
"""
The unpacking error class.
"""
Expand All @@ -86,7 +86,7 @@ def __init__(self, message):
:param message: The message to be printed.
"""

BerException.__init__(self)
BERException.__init__(self)
self.message = message

def __str__(self):
Expand All @@ -99,7 +99,7 @@ def __str__(self):

return "Unpacking error - %s" % self.message

class OperationNotImplemented(BerException):
class OperationNotImplemented(BERException):
"""
The operation not implemented class.
"""
Expand All @@ -112,7 +112,7 @@ def __init__(self, message):
:param message: The message to be printed.
"""

BerException.__init__(self)
BERException.__init__(self)
self.message = message

def __str__(self):
Expand Down
10 changes: 5 additions & 5 deletions format/src/ber_c/system.py
Expand Up @@ -128,17 +128,17 @@
DEFAULT_CLASS = 0x00
""" The default class to be used """

class Ber(colony.System):
class BER(colony.System):
"""
The ber class.
The BER class.
"""

def create_structure(self, parameters):
return BerStructure()
return BERStructure()

class BerStructure(object):
class BERStructure(object):
"""
Class representing a ber structure.
Class representing a BER structure.
"""

buffer = None
Expand Down
10 changes: 5 additions & 5 deletions format/src/ber_plugin.py
Expand Up @@ -39,14 +39,14 @@

import colony

class BerPlugin(colony.Plugin):
class BERPlugin(colony.Plugin):
"""
The main class for the Ber plugin.
The main class for the BER plugin.
"""

id = "pt.hive.colony.plugins.format.ber"
name = "Ber"
description = "The plugin that offers the ber (basic encoding rules) format support"
name = "BER"
description = "The plugin that offers the BER (basic encoding rules) format support"
version = "1.0.0"
author = "Hive Solutions Lda. <development@hive.pt>"
platforms = [
Expand All @@ -64,7 +64,7 @@ class BerPlugin(colony.Plugin):
def load_plugin(self):
colony.Plugin.load_plugin(self)
import ber_c
self.system = ber_c.Ber(self)
self.system = ber_c.BER(self)

def create_structure(self, parameters):
return self.system.create_structure(parameters)

0 comments on commit 4cee8ab

Please sign in to comment.