Skip to content

Commit

Permalink
Using vendor ID of Servisys by default for local objects. Additional …
Browse files Browse the repository at this point in the history
…details on deprecation message for create_xyz functions
  • Loading branch information
ChristianTremblay committed Oct 5, 2020
1 parent 1b2654f commit 79e70a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion BAC0/core/devices/create_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,6 @@ def create_object_list(objects_dict):
def deprecate_msg():
print("*" * 80)
print("create_xx functions are deprecated and will disappear from a future release")
print("BAC0.core.device.local.object will be the new way to define objects")
print("BAC0.core.device.local.object using the ObjectFactory will be the new way to define objects")
print("Refer to the doc for details")
print("*" * 80)
4 changes: 2 additions & 2 deletions BAC0/core/devices/local/decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def wrapper(*args, **kwargs):
base_cls_name = obj.__class__.__name__ + "Cmd"
new_type = type(base_cls_name, (_commando, base_cls), {})
new_type.__name__ = base_cls_name
register_object_type(new_type, vendor_id=0)
register_object_type(new_type, vendor_id=842)
objectType, instance, objectName, presentValue, description = args
new_object = new_type(
objectIdentifier=(base_cls.objectType, instance),
Expand All @@ -133,7 +133,7 @@ def wrapper(*args, **kwargs):
base_cls = obj.__class__
base_cls_name = obj.__class__.__name__ + cls.__name__
new_type = type(base_cls_name, (cls, base_cls), {})
register_object_type(new_type, vendor_id=0)
register_object_type(new_type, vendor_id=842)
instance, objectName, presentValue, description = args
new_object = new_type(
objectIdentifier=(base_cls.objectType, instance),
Expand Down

0 comments on commit 79e70a1

Please sign in to comment.