continuousMove static method

XmlDocumentFragment continuousMove(
  1. String profileToken, {
  2. required PtzSpeed velocity,
  3. int? timeout,
})

XML for the continuousMove, requires a profileToken and PtzSpeed, and optionally timeout in seconds

Implementation

static XmlDocumentFragment continuousMove(String profileToken,
    {required PtzSpeed velocity, int? timeout}) {
  builder.element('ContinuousMove', nest: () {
    builder.namespace(Xmlns.tptz); //tptz

    ReferenceToken(profileToken).buildXml(builder);

    velocity.buildXml(
      builder,
      tag: 'Velocity',
      namespace: Xmlns.tptz,
    );

    if (timeout != null) {
      'PT${timeout}S'
          .buildXml(builder, tag: 'Timeout', namespace: Xmlns.tptz);
    }
  });

  return builder.buildFragment();
}