pipeline.src.entities.missions ============================== .. py:module:: pipeline.src.entities.missions Classes ------- .. autoapisummary:: pipeline.src.entities.missions.MissionActionType pipeline.src.entities.missions.MissionOrigin pipeline.src.entities.missions.MissionType pipeline.src.entities.missions.InfractionType pipeline.src.entities.missions.Infraction pipeline.src.entities.missions.FlightGoal Module Contents --------------- .. py:class:: MissionActionType(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access:: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: SEA_CONTROL :value: 'SEA_CONTROL' .. py:attribute:: LAND_CONTROL :value: 'LAND_CONTROL' .. py:attribute:: AIR_SURVEILLANCE :value: 'AIR_SURVEILLANCE' .. py:attribute:: AIR_CONTROL :value: 'AIR_CONTROL' .. py:method:: from_poseidon_control_type(poseidon_control_type: str) :staticmethod: .. py:class:: MissionOrigin(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access:: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: POSEIDON_CNSP :value: 'POSEIDON_CNSP' .. py:attribute:: POSEIDON_CACEM :value: 'POSEIDON_CACEM' .. py:attribute:: MONITORFISH :value: 'MONITORFISH' .. py:attribute:: MONITORENV :value: 'MONITORENV' .. py:class:: MissionType(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access:: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: SEA :value: 'SEA' .. py:attribute:: LAND :value: 'LAND' .. py:attribute:: AIR :value: 'AIR' .. py:method:: from_mission_action_type(mission_action_type: MissionActionType) :staticmethod: .. py:class:: InfractionType(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access:: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: WITH_RECORD :value: 'WITH_RECORD' .. py:attribute:: WITHOUT_RECORD :value: 'WITHOUT_RECORD' .. py:method:: from_poseidon_infraction_field() Translates the `infraction` field of the Poseidon database into the corresponding InfractionType. The `infraction` field of the Poseidon database holds values: - 0 for controls without infraction - 1 for controls with infraction(s) - 2 for controls with infraction(s) but without record ("PV" in french) In some rare cases, the `infraction` field has the value 0 although some infractions are present in the control results. In these cases, we'll consider there was no record. :param infraction: 0, 1 or 2 :type infraction: int :returns: InfractionType .. py:class:: Infraction .. py:attribute:: natinf :type: int .. py:attribute:: comments :type: str .. py:class:: FlightGoal(*args, **kwds) Bases: :py:obj:`enum.Enum` Create a collection of name/value pairs. Example enumeration: >>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3 Access them by: - attribute access:: >>> Color.RED - value lookup: >>> Color(1) - name lookup: >>> Color['RED'] Enumerations can be iterated over, and know how many members they have: >>> len(Color) 3 >>> list(Color) [, , ] Methods can be added to enumerations, and members can have their own attributes -- see the documentation for details. .. py:attribute:: VMS_AIS_CHECK :value: 'VMS_AIS_CHECK' .. py:attribute:: UNAUTHORIZED_FISHING :value: 'UNAUTHORIZED_FISHING' .. py:attribute:: CLOSED_AREA :value: 'CLOSED_AREA' .. py:property:: label