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
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 = []
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
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 = {}
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
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
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 = {}
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 = {}
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
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 = {}
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 = {}
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
def comment(self, comment): validate_attribute(comment, 'component.ext.comment', expected_type=string_types(), required=False) self._comment = comment
def location(self, location): validate_attribute(location, 'component.ext.Location', expected_type=Location, required=True) self._location = location
def data_ports(self, data_ports): validate_attribute(data_ports, 'component.DataPorts', expected_type=list, required=False) self._data_ports = data_ports
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
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
def target_component(self, target_component): validate_attribute(target_component, 'conditions.TargetComponent', expected_type=TargetExecutionContext, required=True) self._target_component = target_component
def group_id(self, group_id): validate_attribute(group_id, 'component_group.groupID', expected_type=string_types(), required=True) self._group_id = group_id
def id(self, id): validate_attribute(id, 'target_executioncontext.id', expected_type=string_types(), required=True) self._id = id
def sequence(self, sequence): validate_attribute(sequence, 'conditions.sequence', expected_type=int, required=False) self._sequence = sequence
def visible(self, visible): validate_attribute(visible, 'component.ext.visible', expected_type=bool, required=False) self._visible = visible
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
def height(self, height): validate_attribute(height, 'Location.height', expected_type=int, required=False) self._height = height
def properties(self, properties): validate_attribute(properties, 'conditions.ext.Properties', expected_type=dict, required=False) self._properties = properties
def direction(self, direction): validate_attribute(direction, 'Location.direction', expected_type=dir.const_type, required=False) self._direction = direction
def component_id(self, component_id): validate_attribute(component_id, 'target_component.componentID', expected_type=string_types(), required=True) self._component_id = component_id
def path_uri(self, path_uri): validate_attribute(path_uri, 'component.pathUri', expected_type=string_types(), required=True) self._path_uri = path_uri
def x(self, x): validate_attribute(x, 'Location.x', expected_type=int, required=False) self._x = x
def instance_name(self, instance_name): validate_attribute(instance_name, 'component.instanceName', expected_type=string_types(), required=True) self._instance_name = instance_name
def configuration_sets(self, configuration_sets): validate_attribute(configuration_sets, 'component.ConfigurationSets', expected_type=list, required=False) self._config_sets = configuration_sets
def is_required(self, is_required): validate_attribute(is_required, 'component.isRequired', expected_type=bool) self._is_required = is_required
def service_ports(self, service_ports): validate_attribute(service_ports, 'component.ServicePorts', expected_type=list, required=False) self._service_ports = service_ports
def properties(self, properties): validate_attribute(properties, 'target_executioncontext.ext.Properties', expected_type=dict, required=False) self._properties = properties
def execution_contexts(self, execution_contexts): validate_attribute(execution_contexts, 'component.ExecutionContexts', expected_type=list, required=False) self._exec_contexts = execution_contexts
def preceding_components(self, preceding_components): validate_attribute(sending_timing, 'preceding.PrecedingComponents', expected_type=list, required=False) self._preceding_components = preceding_components
def participants(self, participants): validate_attribute(participants, 'component.Participants', expected_type=list, required=False) self._participants = participants
def __init__(self, targets=[]): '''@param targets Orderings and conditions.''' validate_attribute(targets, 'message_sending.Targets', expected_type=list, required=False) self._targets = targets
def wait_time(self, wait_time): validate_attribute(wait_time, 'wait_time.waitTime', expected_type=int, required=False) self._wait_time = wait_time
def properties(self, properties): validate_attribute(properties, 'component.ext.Properties', expected_type=dict, required=False) self._properties = properties
def targets(self, targets): validate_attribute(targets, 'message_sending.targets', expected_type=list, required=False) self._targets = targets
def width(self, width): validate_attribute(width, 'Location.width', expected_type=int, required=False) self._width = width
def id(self, id): validate_attribute(id, 'component.id', expected_type=string_types(), required=True) self._id = id
def timeout(self, timeout): validate_attribute(timeout, 'preceding.timeout', expected_type=int, required=False) self._timeout = timeout
def members(self, members): validate_attribute(members, 'component_group.Members', expected_type=list, required=True) self._members = members
def y(self, y): validate_attribute(y, 'Location.y', expected_type=int, required=False) self._y = y
def sending_timing(self, sending_timing): validate_attribute(sending_timing, 'preceding.sendingTiming', expected_type=string_types(), required=False) self._sending_timing = sending_timing