Skip to main content
This page provides details on the trigger options available in the trigger command for the create or update trigger with a file. This is a guide how to fill in the file for some fields.

Possible values for each signal type for mscs and rscs

{
  "STRING": {
    "operator": ["CONTAIN", "NOT_CONTAIN", "EQUAL", "NOT_EQUAL"],
    "signalID": "string",
    "value": { "string": "string" }
  },
  "BOOLEAN": {
    "signalID": "string",
    "value": { "boolean": [true, false] }
  },
  "CUSTOM": {
    "signalID": "string",
    "value": { "custom": "string" }
  },
  "DATE": {
    "operator": ["AFTER", "BEFORE", "ON"],
    "signalID": "string",
    "value": { "date": "integer" }
  },
  "ACCELERATION": {
    "operator": ["LESS_THAN", "GREATER_THAN", "EQUAL", "GREATER_THAN_OR_EQUAL", "LESS_THAN_OR_EQUAL"],
    "signalID": "string",
    "value": { "double": "float" },
    "unit": [
      "METER_PER_SECOND_SQUARE",
      "KILOMETER_PER_HOUR_SQUARE",
      "MILE_PER_HOUR_SQUARE",
      "KNOT_PER_SECOND"
    ]
  },
  "DISTANCE": {
    "operator": ["LESS_THAN", "GREATER_THAN", "EQUAL", "GREATER_THAN_OR_EQUAL", "LESS_THAN_OR_EQUAL"],
    "signalID": "string",
    "value": { "double": "float" },
    "unit": ["METER", "KILOMETER", "MILE", "NAUTICAL_MILE"]
  },
  "SPEED": {
    "operator": ["LESS_THAN", "GREATER_THAN", "EQUAL", "GREATER_THAN_OR_EQUAL", "LESS_THAN_OR_EQUAL"],
    "signalID": "string",
    "value": { "double": "float" },
    "unit": ["METER_PER_SECOND", "KILOMETER_PER_HOUR", "MILE_PER_HOUR", "KNOT"]
  },
  "TIME": {
    "operator": ["LESS_THAN", "GREATER_THAN", "EQUAL", "GREATER_THAN_OR_EQUAL", "LESS_THAN_OR_EQUAL"],
    "signalID": "string",
    "value": { "double": "float" },
    "unit": [
      "MICROSECOND",
      "MILLISECOND",
      "SECOND",
      "MINUTE",
      "HOUR",
      "DAY",
      "WEEK",
      "MONTH",
      "YEAR"
    ]
  },
  "INTEGER": {
    "operator": ["LESS_THAN", "GREATER_THAN", "EQUAL", "GREATER_THAN_OR_EQUAL", "LESS_THAN_OR_EQUAL"],
    "signalID": "string",
    "value": { "int": "integer" }
  },
  "NUMBER": {
    "operator": ["LESS_THAN", "GREATER_THAN", "EQUAL", "NOT_EQUAL", "GREATER_THAN_OR_EQUAL", "LESS_THAN_OR_EQUAL"],
    "signalID": "string",
    "value": { "double": "float" }
  }
}

Possible values for the priority field

{
  "PRIORITY_UNSPECIFIED",
  "CRITICAL",
  "LOW",
  "MEDIUM",
  "HIGH"
}

Possible values for the status field

{
  "TRIGGER_STATUS_UNSPECIFIED",
  "TRIGGER_REQUESTED",
  "TRIGGER_TO_CONFIGURE",
  "TRIGGER_TO_CODE",
  "TRIGGER_TO_DEPLOY",
  "TRIGGER_READY"
}

Logical Expressions

By default, all monitoring signal conditions (mscs) are combined with AND logic. To combine conditions with OR, XOR, NOT, or other operators, use the logicalExpression field.

Logical Operators

OperatorDescriptionResult
ANDAll operands must be trueTrue if A=true AND B=true
ORAt least one operand must be trueTrue if A=true OR B=true
NOTInverts a single operandTrue if A=false
XORExactly one operand must be trueTrue if A≠B
XANDOperands must have same valueTrue if A=B
NANDNOT ANDFalse only if all are true
NORNOT ORTrue only if all are false

Structure

Each condition needs an operandLetter (A, B, C, etc.) to be referenced in the logical expression:
{
  "mscs": [
    {
      "operator": "GREATER_THAN",
      "value": { "double": 80.0 },
      "signal_id": "si-temperature",
      "operandLetter": "A"
    },
    {
      "operator": "LESS_THAN",
      "value": { "double": 20.0 },
      "signal_id": "si-battery",
      "operandLetter": "B"
    }
  ],
  "logicalExpression": {
    "type": "OPERATION",
    "operation": {
      "operator": "OR",
      "operands": [
        { "type": "CONDITION", "condition": { "monitoringSignalConditionId": "A" } },
        { "type": "CONDITION", "condition": { "monitoringSignalConditionId": "B" } }
      ]
    }
  }
}

Nested Expressions

For complex logic like (A AND B) OR C, nest operations:
{
  "logicalExpression": {
    "type": "OPERATION",
    "operation": {
      "operator": "OR",
      "operands": [
        {
          "type": "OPERATION",
          "operation": {
            "operator": "AND",
            "operands": [
              { "type": "CONDITION", "condition": { "monitoringSignalConditionId": "A" } },
              { "type": "CONDITION", "condition": { "monitoringSignalConditionId": "B" } }
            ]
          }
        },
        { "type": "CONDITION", "condition": { "monitoringSignalConditionId": "C" } }
      ]
    }
  }
}

NOT Operator Example

The NOT operator takes a single operand:
{
  "logicalExpression": {
    "type": "OPERATION",
    "operation": {
      "operator": "AND",
      "operands": [
        {
          "type": "OPERATION",
          "operation": {
            "operator": "NOT",
            "operands": [
              { "type": "CONDITION", "condition": { "monitoringSignalConditionId": "A" } }
            ]
          }
        },
        { "type": "CONDITION", "condition": { "monitoringSignalConditionId": "B" } }
      ]
    }
  }
}
This triggers when A is false AND B is true (e.g., motor stopped but temperature high).

Common Patterns

PatternExpressionUse Case
Either conditionA OR BAlert on battery OR temperature critical
Both conditionsA AND BAlert when speed high AND obstacle close
One but not bothA XOR BDetect sensor inconsistency
Inverted conditionNOT A AND BMotor stopped but temperature high
Two failure modes(A AND B) OR CCollision risk OR emergency stop