pub struct OpcReadResponse {
pub tag: String,
pub value: String,
pub quality: SampleQuality,
pub timestamp: Option<DateTime<Utc>>,
}Expand description
Response body of GET /api/opc/read.
quality reuses SampleQuality rather than a third quality representation –
bhtune-db’s SampleQuality (mapped from the driver’s live bhtune_driver::Quality by
sample_quality_from_driver) is already exposed directly over HTTP in
GET /api/runs/{id}’s SampleResponse::pv_quality (see routes::history), so this
follows that same precedent instead of inventing a parallel OpcQualityResponse enum.
Fields§
§tag: String§value: String§quality: SampleQuality§timestamp: Option<DateTime<Utc>>Always null for the OPC DA driver today: the gateway’s last-change time is a
local, offset-less string with no reliable way to convert it to a trustworthy
DateTime<Utc> (see bhtune_driver::opcda::tag_value_from_raw’s doc comment) – kept
as a field rather than dropped entirely so a future driver that can supply a
trustworthy instant (or a bridge protocol revision that reports the gateway’s own
timezone) doesn’t need an API shape change to start populating it.
Trait Implementations§
Source§impl ComposeSchema for OpcReadResponse
impl ComposeSchema for OpcReadResponse
Source§impl Debug for OpcReadResponse
impl Debug for OpcReadResponse
Source§impl Serialize for OpcReadResponse
impl Serialize for OpcReadResponse
Auto Trait Implementations§
impl Freeze for OpcReadResponse
impl RefUnwindSafe for OpcReadResponse
impl Send for OpcReadResponse
impl Sync for OpcReadResponse
impl Unpin for OpcReadResponse
impl UnsafeUnpin for OpcReadResponse
impl UnwindSafe for OpcReadResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].