gotoPreset static method

XmlDocumentFragment gotoPreset(
  1. String profileToken,
  2. String presetToken,
  3. PtzSpeed? speed
)

XML for the gotoPreset, requires a profileToken, presetToken and optionally PtzSpeed

Implementation

static XmlDocumentFragment gotoPreset(
    String profileToken, String presetToken, PtzSpeed? speed) {
  Transport.builder.element('GotoPreset', nest: () {
    Transport.builder.namespace(Xmlns.tptz);

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

    ReferenceToken(presetToken).buildXml(
      Transport.builder,
      tag: 'PresetToken',
    );

    speed?.buildXml(
      Transport.builder,
      tag: 'Speed',
      namespace: Xmlns.tptz,
    );
  });

  return Transport.builder.buildFragment();
}