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

Implementation

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

    ReferenceToken(profileToken).buildXml(Transport.builder);

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

    if (timeout != null) {
      Transport.builder.element('Timeout', nest: () {
        Transport.builder.namespace(Xmlns.tptz);
        Transport.builder.text('PT${timeout}S');
      });
    }
  });

  return Transport.builder.buildFragment();
}