connectionReadWithHttpInfo method

Future<Response> connectionReadWithHttpInfo(
  1. String id,
  2. ConnectionReadRequest connectionReadRequest, {
  3. required String uuidToken,
})

Read one metric over the specified connection

Read one metric from the given connection. Requires the associated metrics as an array of MetricS7, MetricModbus or MetricOPCUA objects. Returns an array of read values as Value object or a Error if the read went wrong. If an Internal Server Error occours, an Error object will be returned.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> connectionReadWithHttpInfo(
  String id,
  ConnectionReadRequest connectionReadRequest, {
  required String uuidToken,
}) async {
  // ignore: prefer_const_declarations
  final path = '${LbWriterEnvironment.getApiEndpoint(
    iotUuid: uuidToken,
  )}/connection/$id/read';

  // ignore: prefer_final_locals
  Object? postBody = connectionReadRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}