// Dstl (c) Crown Copyright 2024
//
// [START declaration]
syntax = "proto3";
package sapient_msg.bsi_flex_335_v2_0;
import "google/protobuf/timestamp.proto";
import "sapient_msg/bsi_flex_335_v2_0/location.proto";
import "sapient_msg/bsi_flex_335_v2_0/range_bearing.proto";
import "sapient_msg/bsi_flex_335_v2_0/follow.proto";
import "sapient_msg/bsi_flex_335_v2_0/registration.proto";
import "sapient_msg/proto_options.proto";
// [END declaration]
// [START java_declaration]
option java_multiple_files = true;
option java_package = "uk.gov.dstl.sapientmsg.bsiflex335v2";
option java_outer_classname = "TaskProto";
// [END java_declaration]
// [START messages]
message Task {
optional string task_id = 1 [(field_options) = {is_mandatory: true, is_ulid: true}]; // ULID for the task being sent
optional string task_name = 2; // Name of the task being requested
optional string task_description = 3; // Description of the task being requested
optional google.protobuf.Timestamp task_start_time = 4; // Time the task is requested to start at
optional google.protobuf.Timestamp task_end_time = 5; // Time the task is requested to end at
optional Control control = 6 [(field_options) = {is_mandatory: true}]; // Control action being requested
repeated Region region = 7; // Area tasking is to be applied (such as a system implementing geo-fencing)
optional Command command = 8; // Command being requested as part the task
enum Control {
reserved 4; // Default task has been removed as it is not possible to define
CONTROL_UNSPECIFIED = 0; // No control set
CONTROL_START = 1; // Initialise/start the task
CONTROL_STOP = 2; // Stop the task, remove the definition and revert to the previous task
CONTROL_PAUSE = 3; // Stop the task, keep the definition for later use and revert to previous task
// CONTROL_DEFAULT = 4; // Start/revert to the default task. Stop all other tasks
}
message Command {
reserved 7; // This was a proposed 'custom' command that was never ratified
oneof command {
option (oneof_options) = {is_mandatory: true};
string request = 1; // The request being asked for
DiscreteThreshold detection_threshold = 2; // The requested sensitivity of sensor during the task
DiscreteThreshold detection_report_rate = 3; // The requested reporting rate of sensor during the task
DiscreteThreshold classification_threshold = 4; // The requested classification sensitivity of sensor during the task
string mode_change = 5; // Mode change for the ASM
LocationOrRangeBearing look_at = 6; // LookAt command for tasking pointing ASMs
LocationList move_to = 9; //command for instructing a mobile node to move to a new location
LocationList patrol =10; // command for instructing a mobile node to continually patrol a route until instructed otherwise
FollowObject follow = 11; //command for instructing a mobile node to follow a moving object until instructed otherwise
}
optional string command_parameter = 8; // Parameter string for some commands
}
enum DiscreteThreshold {
DISCRETE_THRESHOLD_UNSPECIFIED = 0; // Threshold not set
DISCRETE_THRESHOLD_LOW = 1; // Threshold set to low
DISCRETE_THRESHOLD_MEDIUM = 2; // Threshold set to medium
DISCRETE_THRESHOLD_HIGH = 3; // Threshold set to high
}
message Region {
optional RegionType type = 1 [(field_options) = {is_mandatory: true}]; // Type of region
optional string region_id = 2 [(field_options) = {is_mandatory: true, is_ulid: true}]; // Unique ID of region
optional string region_name = 3 [(field_options) = {is_mandatory: true}]; // Name of region
optional LocationOrRangeBearing region_area = 4 [(field_options) = {is_mandatory: true}]; // Area that defines the region
repeated ClassFilter class_filter = 5; // Filter for classifications detected in the region
repeated BehaviourFilter behaviour_filter = 6; // Filter for behaviours detected in the region
}
//
// Note: enum RegionType also features in registration.proto, if making changes to this enumeration, identical changes must be made
// in the same enumeration in registration.proto. Users should be aware, future versions of the SAPIENT proto files may be
// restructured so that enum RegionType only appears once.
//
enum RegionType {
REGION_TYPE_UNSPECIFIED = 0; // No region type set
REGION_TYPE_AREA_OF_INTEREST = 1; // Region is of particular interest
REGION_TYPE_IGNORE = 2; // Region to be ignored
REGION_TYPE_BOUNDARY = 3; // Region defines the boundary of the area of operations
REGION_TYPE_MOBILE_NODE_NO_GO_AREA = 4; // Region defines an area that mobile nodes shall not enter
REGION_TYPE_MOBILE_NODE_GO_AREA = 5; //Region defines an area that mobile nodes shall remain within
}
message ClassFilter {
optional Parameter parameter = 1 [(field_options) = {is_mandatory: true}]; // Parameter to filter on
optional string type = 2 [(field_options) = {is_mandatory: true}]; // Type of classification to filter on
repeated SubClassFilter sub_class_filter = 3; // Sub-classes to filter on
optional DiscreteThreshold priority = 4; // Priority of filter
}
message SubClassFilter {
optional Parameter parameter = 1 [(field_options) = {is_mandatory: true}]; // Parameter to filter on
optional string type = 2 [(field_options) = {is_mandatory: true}]; // Type of classification to filter on
repeated SubClassFilter sub_class_filter = 3; // Sub-classes to filter on
optional DiscreteThreshold priority = 4; // Priority of filter
}
message BehaviourFilter {
optional Parameter parameter = 1 [(field_options) = {is_mandatory: true}]; // Parameter to filter on
optional string type = 2; // Type of behaviour to filter on
optional DiscreteThreshold priority = 3; // Priority of filter
}
message Parameter {
optional string name = 1 [(field_options) = {is_mandatory: true}]; // Name of the parameter to filter
optional Operator operator = 2 [(field_options) = {is_mandatory: true}]; // Operator to be filtered on
optional float value = 3 [(field_options) = {is_mandatory: true}]; // Threshold
}
}
// [END messages]