Exemplo n.º 1
0
    def __init__(self, x=0, y=0, height=0, width=0, direction=dir.DOWN):
        '''Constructor.

        @param x X position of the top-left of the component.
        @type x int
        @param y Y position of the top-left of the component.
        @type y int
        @param height Height of the component.
        @type height int
        @param width Width of the component.
        @type width int
        @param direction Direction the component faces.
        @type direction direction.const_type

        '''
        validate_attribute(x, 'Location.x', expected_type=int, required=False)
        self._x = x
        validate_attribute(y, 'Location.y', expected_type=int, required=False)
        self._y = y
        validate_attribute(height,
                           'Location.height',
                           expected_type=int,
                           required=False)
        self._height = height
        validate_attribute(width,
                           'Location.width',
                           expected_type=int,
                           required=False)
        self._width = width
        validate_attribute(direction,
                           'Location.direction',
                           expected_type=dir.const_type,
                           required=False)
        self._direction = direction
Exemplo n.º 2
0
    def __init__(self, x=0, y=0, height=0, width=0, direction=dir.DOWN):
        '''Constructor.

        @param x X position of the top-left of the component.
        @type x int
        @param y Y position of the top-left of the component.
        @type y int
        @param height Height of the component.
        @type height int
        @param width Width of the component.
        @type width int
        @param direction Direction the component faces.
        @type direction direction.const_type

        '''
        validate_attribute(x, 'Location.x',
                           expected_type=int, required=False)
        self._x = x
        validate_attribute(y, 'Location.y',
                           expected_type=int, required=False)
        self._y = y
        validate_attribute(height, 'Location.height',
                           expected_type=int, required=False)
        self._height = height
        validate_attribute(width, 'Location.width',
                           expected_type=int, required=False)
        self._width = width
        validate_attribute(direction, 'Location.direction',
                           expected_type=dir.const_type, required=False)
        self._direction = direction
Exemplo n.º 3
0
    def __init__(self, id=''):
        '''Constructor.

        @param id The configuration set ID.
        @type id str

        '''
        validate_attribute(id, 'configuration_set.id',
                           expected_type=string_types(), required=False)
        self._id = id
        self._config_data = []
Exemplo n.º 4
0
    def __init__(self, component_id='', instance_name='', port_name=''):
        '''Constructor. See also the @ref TargetComponent constructor.

        @param port_name The name of the target port.
        @type port_name str

        '''
        super(TargetPort, self).__init__(component_id, instance_name)
        validate_attribute(port_name, 'target_port.portName',
                           expected_type=string_types(), required=False)
        self._port_name = port_name
Exemplo n.º 5
0
    def __init__(self, component_id='', instance_name='', id=''):
        '''Constructor. See also the @ref TargetComponent constructor.

        @param id The ID of the target execution context.
        @type id str

        '''
        super(TargetExecutionContext, self).__init__(component_id,
                                                     instance_name)
        validate_attribute(id, 'target_executioncontext.id',
                           expected_type=string_types(), required=False)
        self._id = id
        self._properties = {}
Exemplo n.º 6
0
    def __init__(self, id=''):
        '''Constructor.

        @param id The configuration set ID.
        @type id str

        '''
        validate_attribute(id,
                           'configuration_set.id',
                           expected_type=string_types(),
                           required=False)
        self._id = id
        self._config_data = []
Exemplo n.º 7
0
    def __init__(self, name='', data=''):
        '''Constructor.

        @param name The name of the parameter.
        @type name str
        @param data The parameter's value, if any.
        @type data str

        '''
        validate_attribute(name, 'configuration_set.name',
                           expected_type=string_types(), required=False)
        self._name = name
        validate_attribute(data, 'configuration_set.data',
                           expected_type=string_types(), required=False)
        self._data = data
Exemplo n.º 8
0
    def __init__(self, group_id='', members=[]):
        '''Constructor.

        @param group_id ID of the group.
        @type group_id str
        @param members Members of the group. At least one must be present.
        @type members list

        '''
        validate_attribute(group_id, 'component_group.groupID',
                           expected_type=string_types(), required=False)
        self._group_id = group_id
        validate_attribute(members, 'component_group.Members',
                           expected_type=list, required=False)
        self._members = members
Exemplo n.º 9
0
    def __init__(self, component_id='', instance_name=''):
        '''Constructor.

        @param component_id The ID of the target component.
        @type component_id str
        @param instance_name The instance name of the target component.
        @type instance_name str

        '''
        validate_attribute(component_id, 'target_component.componentID',
                           expected_type=string_types(), required=False)
        self._component_id = component_id
        validate_attribute(instance_name, 'target_component.instanceName',
                           expected_type=string_types(), required=False)
        self._instance_name = instance_name
        self._properties = {}
Exemplo n.º 10
0
    def __init__(self, sequence=0, target_component=TargetExecutionContext()):
        '''Constructor.

        @param sequence Execution order of the target component.
        @type sequence int
        @param target_component The target of the condition.
        @type target_component TargetComponent
        '''
        validate_attribute(sequence, 'conditions.sequence',
                           expected_type=int, required=False)
        self._sequence = sequence
        validate_attribute(target_component, 'conditions.TargetComponent',
                           expected_type=TargetExecutionContext,
                           required=True)
        self._target_component = target_component
        self._properties = {}
Exemplo n.º 11
0
    def __init__(self, wait_time=0, sequence=0,
                 target_component=TargetExecutionContext()):
        '''Constructor.

        @param sequence Execution order of the target component.
        @type sequence int
        @param target_component The target of the condition.
        @type target_component TargetComponent
        @param wait_time The length of time to wait, in milliseconds.
        @type wait_time int

        '''
        super(WaitTime, self).__init__(sequence, target_component)
        validate_attribute(wait_time, 'wait_time.waitTime',
                           expected_type=int, required=False)
        self._wait_time = wait_time
Exemplo n.º 12
0
    def __init__(self, name='', data=''):
        '''Constructor.

        @param name The name of the parameter.
        @type name str
        @param data The parameter's value, if any.
        @type data str

        '''
        validate_attribute(name,
                           'configuration_set.name',
                           expected_type=string_types(),
                           required=False)
        self._name = name
        validate_attribute(data,
                           'configuration_set.data',
                           expected_type=string_types(),
                           required=False)
        self._data = data
Exemplo n.º 13
0
    def __init__(self, name='', comment='', visible=True):
        '''Constructor.

        @param name Name of the port.
        @type name str
        @param comment A comment about the port.
        @type comment str
        @param visible If this port is visible in graphical displays.
        @type visible bool

        '''
        validate_attribute(name,
                           'dataPort.name',
                           expected_type=string_types(),
                           required=False)
        self._name = name
        validate_attribute(comment,
                           'component.ext.comment',
                           expected_type=string_types(),
                           required=False)
        self._comment = comment
        validate_attribute(visible,
                           'component.ext.visible',
                           expected_type=bool,
                           required=False)
        self._visible = visible
        self._properties = {}
Exemplo n.º 14
0
    def __init__(self, id='', kind='', rate=0.0):
        '''Constructor.

        @param id The ID of this execution context.
        @type id str
        @param kind The action execution type used by this context.
        @type kind str
        @param rate The execution rate of this context, if it is periodic.
        @type float

        '''
        validate_attribute(id,
                           'execution_context.id',
                           expected_type=string_types(),
                           required=False)
        self._id = id
        validate_attribute(kind,
                           'execution_context.kind',
                           expected_type=string_types(),
                           required=False)
        self._kind = kind
        validate_attribute(rate,
                           'execution_context.rate',
                           expected_type=[int, float],
                           required=False)
        self._rate = rate
        self._participants = []
        self._properties = {}
Exemplo n.º 15
0
    def __init__(self, sequence=0, target_component=TargetExecutionContext(),
                 timeout=0, sending_timing='', preceding_components=[]):
        '''Constructor.

        @param sequence Execution order of the target component.
        @type sequence int
        @param target_component The target of the condition.
        @type target_component TargetComponent
        @param timeout Status check timeout.
        @type timeout int
        @param sending_timing Timing for executing actions.
        @type sending_timing str
        @param preceding_components Preceding components of the condition.
        @type preceding components list(TargetExecutionContext)

        '''
        super(Preceding, self).__init__(sequence, target_component)
        validate_attribute(timeout, 'preceding.timeout',
                           expected_type=int, required=False)
        self._timeout = timeout
        validate_attribute(sending_timing, 'preceding.sendingTiming',
                           expected_type=string_types(), required=False)
        self._sending_timing = sending_timing
        validate_attribute(preceding_components,
                           'preceding.PrecedingComponents',
                           expected_type=list, required=False)
        self._preceding_components = preceding_components
Exemplo n.º 16
0
    def __init__(self, name='', comment='', visible=True):
        '''Constructor.

        @param name Name of the port.
        @type name str
        @param comment A comment about the port.
        @type comment str
        @param visible If this port is visible in graphical displays.
        @type visible bool

        '''
        validate_attribute(name, 'dataPort.name',
                           expected_type=string_types(), required=False)
        self._name = name
        validate_attribute(comment, 'component.ext.comment',
                           expected_type=string_types(), required=False)
        self._comment = comment
        validate_attribute(visible, 'component.ext.visible',
                           expected_type=bool, required=False)
        self._visible = visible
        self._properties = {}
Exemplo n.º 17
0
    def __init__(self, id='', kind='', rate=0.0):
        '''Constructor.

        @param id The ID of this execution context.
        @type id str
        @param kind The action execution type used by this context.
        @type kind str
        @param rate The execution rate of this context, if it is periodic.
        @type float

        '''
        validate_attribute(id, 'execution_context.id',
                           expected_type=string_types(), required=False)
        self._id = id
        validate_attribute(kind, 'execution_context.kind',
                           expected_type=string_types(), required=False)
        self._kind = kind
        validate_attribute(rate, 'execution_context.rate',
                           expected_type=[int, float], required=False)
        self._rate = rate
        self._participants = []
        self._properties = {}
Exemplo n.º 18
0
 def comment(self, comment):
     validate_attribute(comment,
                        'component.ext.comment',
                        expected_type=string_types(),
                        required=False)
     self._comment = comment
Exemplo n.º 19
0
 def location(self, location):
     validate_attribute(location,
                        'component.ext.Location',
                        expected_type=Location,
                        required=True)
     self._location = location
Exemplo n.º 20
0
 def data_ports(self, data_ports):
     validate_attribute(data_ports,
                        'component.DataPorts',
                        expected_type=list,
                        required=False)
     self._data_ports = data_ports
Exemplo n.º 21
0
 def comment(self, comment):
     validate_attribute(comment, 'component.ext.comment',
                        expected_type=string_types(), required=False)
     self._comment = comment
Exemplo n.º 22
0
 def active_configuration_set(self, active_config_set):
     validate_attribute(active_config_set,
                        'component.activeConfigurationSet',
                        expected_type=string_types(),
                        required=False)
     self._active_config_set = active_config_set
Exemplo n.º 23
0
 def composite_type(self, composite_type):
     validate_attribute(composite_type,
                        'component.compositeType',
                        expected_type=comp_type.const_type,
                        required=True)
     self._composite_type = composite_type
Exemplo n.º 24
0
 def target_component(self, target_component):
     validate_attribute(target_component, 'conditions.TargetComponent',
                        expected_type=TargetExecutionContext,
                        required=True)
     self._target_component = target_component
Exemplo n.º 25
0
 def group_id(self, group_id):
     validate_attribute(group_id, 'component_group.groupID',
                        expected_type=string_types(), required=True)
     self._group_id = group_id
Exemplo n.º 26
0
 def id(self, id):
     validate_attribute(id, 'target_executioncontext.id',
                        expected_type=string_types(), required=True)
     self._id = id
Exemplo n.º 27
0
 def sequence(self, sequence):
     validate_attribute(sequence, 'conditions.sequence',
                        expected_type=int, required=False)
     self._sequence = sequence
Exemplo n.º 28
0
 def location(self, location):
     validate_attribute(location, 'component.ext.Location',
                        expected_type=Location, required=True)
     self._location = location
Exemplo n.º 29
0
 def visible(self, visible):
     validate_attribute(visible, 'component.ext.visible',
                        expected_type=bool, required=False)
     self._visible = visible
Exemplo n.º 30
0
    def __init__(self, id='', path_uri='', active_configuration_set='',
                 instance_name='', composite_type=comp_type.NONE,
                 is_required=False, comment='', visible=True,
                 location=Location()):
        '''@param id Component ID.
        @type id str
        @param path_uri Path to the component.
        @type path_uri str
        @param active_configuration_set Name of the active configuration set.
        @type active_configuration_set str
        @param instance_name Component's instance name.
        @type instance_name str
        @param composite_type Type of composition the component is in.
        @type composite_type CompositeType
        @param is_required If the component is optional in the system.
        @type is_required bool
        @param comment A comment about the component.
        @type comment str
        @param visible If this component is visible in graphical displays.
        @type visible bool
        @param location The location of this component in graphical displays.
        @type location Location

        '''
        self._reset()
        validate_attribute(id, 'component.id',
                           expected_type=string_types(), required=False)
        self._id = id
        validate_attribute(path_uri, 'component.pathUri',
                           expected_type=string_types(), required=False)
        self._path_uri = path_uri
        validate_attribute(active_configuration_set,
                           'component.activeConfigurationSet',
                           expected_type=string_types(), required=False)
        self._active_config_set = active_configuration_set
        validate_attribute(instance_name, 'component.instanceName',
                           expected_type=string_types(), required=False)
        self._instance_name = instance_name
        validate_attribute(composite_type, 'component.compositeType',
                           expected_type=comp_type.const_type, required=False)
        self._composite_type = composite_type
        validate_attribute(is_required, 'component.isRequired',
                           expected_type=bool)
        self._is_required = is_required
        validate_attribute(comment, 'component.ext.comment',
                           expected_type=string_types(), required=False)
        self._comment = comment
        validate_attribute(visible, 'component.ext.visible',
                           expected_type=bool, required=False)
        self._visible = visible
        validate_attribute(location, 'component.ext.Location',
                           expected_type=Location, required=True)
        self._location = location
Exemplo n.º 31
0
 def height(self, height):
     validate_attribute(height, 'Location.height',
                        expected_type=int, required=False)
     self._height = height
Exemplo n.º 32
0
 def properties(self, properties):
     validate_attribute(properties, 'conditions.ext.Properties',
                        expected_type=dict, required=False)
     self._properties = properties
Exemplo n.º 33
0
 def direction(self, direction):
     validate_attribute(direction, 'Location.direction',
                        expected_type=dir.const_type, required=False)
     self._direction = direction
Exemplo n.º 34
0
 def component_id(self, component_id):
     validate_attribute(component_id, 'target_component.componentID',
                        expected_type=string_types(), required=True)
     self._component_id = component_id
Exemplo n.º 35
0
 def path_uri(self, path_uri):
     validate_attribute(path_uri,
                        'component.pathUri',
                        expected_type=string_types(),
                        required=True)
     self._path_uri = path_uri
Exemplo n.º 36
0
 def x(self, x):
     validate_attribute(x, 'Location.x',
                        expected_type=int, required=False)
     self._x = x
Exemplo n.º 37
0
 def instance_name(self, instance_name):
     validate_attribute(instance_name,
                        'component.instanceName',
                        expected_type=string_types(),
                        required=True)
     self._instance_name = instance_name
Exemplo n.º 38
0
 def configuration_sets(self, configuration_sets):
     validate_attribute(configuration_sets,
                        'component.ConfigurationSets',
                        expected_type=list,
                        required=False)
     self._config_sets = configuration_sets
Exemplo n.º 39
0
 def is_required(self, is_required):
     validate_attribute(is_required,
                        'component.isRequired',
                        expected_type=bool)
     self._is_required = is_required
Exemplo n.º 40
0
    def __init__(self,
                 id='',
                 path_uri='',
                 active_configuration_set='',
                 instance_name='',
                 composite_type=comp_type.NONE,
                 is_required=False,
                 comment='',
                 visible=True,
                 location=Location()):
        '''@param id Component ID.
        @type id str
        @param path_uri Path to the component.
        @type path_uri str
        @param active_configuration_set Name of the active configuration set.
        @type active_configuration_set str
        @param instance_name Component's instance name.
        @type instance_name str
        @param composite_type Type of composition the component is in.
        @type composite_type CompositeType
        @param is_required If the component is optional in the system.
        @type is_required bool
        @param comment A comment about the component.
        @type comment str
        @param visible If this component is visible in graphical displays.
        @type visible bool
        @param location The location of this component in graphical displays.
        @type location Location

        '''
        self._reset()
        validate_attribute(id,
                           'component.id',
                           expected_type=string_types(),
                           required=False)
        self._id = id
        validate_attribute(path_uri,
                           'component.pathUri',
                           expected_type=string_types(),
                           required=False)
        self._path_uri = path_uri
        validate_attribute(active_configuration_set,
                           'component.activeConfigurationSet',
                           expected_type=string_types(),
                           required=False)
        self._active_config_set = active_configuration_set
        validate_attribute(instance_name,
                           'component.instanceName',
                           expected_type=string_types(),
                           required=False)
        self._instance_name = instance_name
        validate_attribute(composite_type,
                           'component.compositeType',
                           expected_type=comp_type.const_type,
                           required=False)
        self._composite_type = composite_type
        validate_attribute(is_required,
                           'component.isRequired',
                           expected_type=bool)
        self._is_required = is_required
        validate_attribute(comment,
                           'component.ext.comment',
                           expected_type=string_types(),
                           required=False)
        self._comment = comment
        validate_attribute(visible,
                           'component.ext.visible',
                           expected_type=bool,
                           required=False)
        self._visible = visible
        validate_attribute(location,
                           'component.ext.Location',
                           expected_type=Location,
                           required=True)
        self._location = location
Exemplo n.º 41
0
 def service_ports(self, service_ports):
     validate_attribute(service_ports,
                        'component.ServicePorts',
                        expected_type=list,
                        required=False)
     self._service_ports = service_ports
Exemplo n.º 42
0
 def properties(self, properties):
     validate_attribute(properties,
                        'target_executioncontext.ext.Properties',
                        expected_type=dict, required=False)
     self._properties = properties
Exemplo n.º 43
0
 def execution_contexts(self, execution_contexts):
     validate_attribute(execution_contexts,
                        'component.ExecutionContexts',
                        expected_type=list,
                        required=False)
     self._exec_contexts = execution_contexts
Exemplo n.º 44
0
 def preceding_components(self, preceding_components):
     validate_attribute(sending_timing, 'preceding.PrecedingComponents',
                        expected_type=list, required=False)
     self._preceding_components = preceding_components
Exemplo n.º 45
0
 def participants(self, participants):
     validate_attribute(participants,
                        'component.Participants',
                        expected_type=list,
                        required=False)
     self._participants = participants
Exemplo n.º 46
0
 def __init__(self, targets=[]):
     '''@param targets Orderings and conditions.'''
     validate_attribute(targets, 'message_sending.Targets',
                        expected_type=list, required=False)
     self._targets = targets
Exemplo n.º 47
0
 def visible(self, visible):
     validate_attribute(visible,
                        'component.ext.visible',
                        expected_type=bool,
                        required=False)
     self._visible = visible
Exemplo n.º 48
0
 def wait_time(self, wait_time):
     validate_attribute(wait_time, 'wait_time.waitTime',
                        expected_type=int, required=False)
     self._wait_time = wait_time
Exemplo n.º 49
0
 def properties(self, properties):
     validate_attribute(properties,
                        'component.ext.Properties',
                        expected_type=dict,
                        required=False)
     self._properties = properties
Exemplo n.º 50
0
 def targets(self, targets):
     validate_attribute(targets, 'message_sending.targets',
                        expected_type=list, required=False)
     self._targets = targets
Exemplo n.º 51
0
 def width(self, width):
     validate_attribute(width, 'Location.width',
                        expected_type=int, required=False)
     self._width = width
Exemplo n.º 52
0
 def id(self, id):
     validate_attribute(id,
                        'component.id',
                        expected_type=string_types(),
                        required=True)
     self._id = id
Exemplo n.º 53
0
 def timeout(self, timeout):
     validate_attribute(timeout, 'preceding.timeout',
                        expected_type=int, required=False)
     self._timeout = timeout
Exemplo n.º 54
0
 def members(self, members):
     validate_attribute(members, 'component_group.Members',
                        expected_type=list, required=True)
     self._members = members
Exemplo n.º 55
0
 def y(self, y):
     validate_attribute(y, 'Location.y',
                        expected_type=int, required=False)
     self._y = y
Exemplo n.º 56
0
 def sending_timing(self, sending_timing):
     validate_attribute(sending_timing, 'preceding.sendingTiming',
                        expected_type=string_types(), required=False)
     self._sending_timing = sending_timing