@@ -375,4 +375,210 @@ pub struct OptionalWebRtcConfigResponse {
375375 #[ prost( message, optional, tag="1" ) ]
376376 pub config : :: core:: option:: Option < WebRtcConfig > ,
377377}
378+ /// ConnectionCandidate describes the selected ICE candidate for one side of a WebRTC connection.
379+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
380+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
381+ pub struct ConnectionCandidate {
382+ #[ prost( enumeration="IceCandidateType" , tag="1" ) ]
383+ pub r#type : i32 ,
384+ /// relay_address is the relay server address of this candidate; set only when type is
385+ /// RELAY, so the signaling server can classify the provider by matching against known
386+ /// coturn addresses.
387+ #[ prost( string, tag="2" ) ]
388+ pub relay_address : :: prost:: alloc:: string:: String ,
389+ }
390+ /// ReportConnectionMetadataRequest reports metadata about a WebRTC dial, per side: local is the
391+ /// dialing SDK and remote is the robot.
392+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
393+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
394+ pub struct ReportConnectionMetadataRequest {
395+ #[ prost( message, optional, tag="1" ) ]
396+ pub local : :: core:: option:: Option < ConnectionCandidate > ,
397+ #[ prost( message, optional, tag="2" ) ]
398+ pub remote : :: core:: option:: Option < ConnectionCandidate > ,
399+ #[ prost( enumeration="SdkType" , tag="3" ) ]
400+ pub sdk_type : i32 ,
401+ /// reached_stage is the furthest dial checkpoint reached. READY indicates success; any earlier
402+ /// value is where a failed dial stopped.
403+ #[ prost( enumeration="DialStage" , tag="4" ) ]
404+ pub reached_stage : i32 ,
405+ /// duration_ms is the wall-clock time from dial start to connection ready or to the failure.
406+ #[ prost( uint32, tag="5" ) ]
407+ pub duration_ms : u32 ,
408+ /// signaling_path is how the dial was signaled (cloud / local / mDNS); reported regardless of outcome.
409+ #[ prost( enumeration="ConnectionSignalingPath" , tag="6" ) ]
410+ pub signaling_path : i32 ,
411+ /// failure_code is the gRPC status code of a failed dial
412+ #[ prost( int32, tag="7" ) ]
413+ pub failure_code : i32 ,
414+ /// sdk_version is the version of the dialing SDK (e.g. a semver or git tag).
415+ #[ prost( string, tag="8" ) ]
416+ pub sdk_version : :: prost:: alloc:: string:: String ,
417+ }
418+ /// ReportConnectionMetadataResponse is empty.
419+ #[ allow( clippy:: derive_partial_eq_without_eq) ]
420+ #[ derive( Clone , PartialEq , :: prost:: Message ) ]
421+ pub struct ReportConnectionMetadataResponse {
422+ }
423+ /// ICECandidateType represents the type of ICE candidate selected for a WebRTC connection.
424+ /// The signaling server further classifies RELAY by relay server specific provider from the address.
425+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , PartialOrd , Ord , :: prost:: Enumeration ) ]
426+ #[ repr( i32 ) ]
427+ pub enum IceCandidateType {
428+ Unspecified = 0 ,
429+ /// ICE_CANDIDATE_TYPE_HOST indicates a direct connection was established.
430+ Host = 1 ,
431+ /// ICE_CANDIDATE_TYPE_STUN indicates a STUN-assisted connection was established.
432+ Stun = 2 ,
433+ /// ICE_CANDIDATE_TYPE_RELAY indicates a TURN relay candidate was selected.
434+ Relay = 3 ,
435+ }
436+ impl IceCandidateType {
437+ /// String value of the enum field names used in the ProtoBuf definition.
438+ ///
439+ /// The values are not transformed in any way and thus are considered stable
440+ /// (if the ProtoBuf definition does not change) and safe for programmatic use.
441+ pub fn as_str_name ( & self ) -> & ' static str {
442+ match self {
443+ IceCandidateType :: Unspecified => "ICE_CANDIDATE_TYPE_UNSPECIFIED" ,
444+ IceCandidateType :: Host => "ICE_CANDIDATE_TYPE_HOST" ,
445+ IceCandidateType :: Stun => "ICE_CANDIDATE_TYPE_STUN" ,
446+ IceCandidateType :: Relay => "ICE_CANDIDATE_TYPE_RELAY" ,
447+ }
448+ }
449+ /// Creates an enum from field names used in the ProtoBuf definition.
450+ pub fn from_str_name ( value : & str ) -> :: core:: option:: Option < Self > {
451+ match value {
452+ "ICE_CANDIDATE_TYPE_UNSPECIFIED" => Some ( Self :: Unspecified ) ,
453+ "ICE_CANDIDATE_TYPE_HOST" => Some ( Self :: Host ) ,
454+ "ICE_CANDIDATE_TYPE_STUN" => Some ( Self :: Stun ) ,
455+ "ICE_CANDIDATE_TYPE_RELAY" => Some ( Self :: Relay ) ,
456+ _ => None ,
457+ }
458+ }
459+ }
460+ /// SDKType represents the Viam SDK used to establish the connection.
461+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , PartialOrd , Ord , :: prost:: Enumeration ) ]
462+ #[ repr( i32 ) ]
463+ pub enum SdkType {
464+ Unspecified = 0 ,
465+ Go = 1 ,
466+ Typescript = 2 ,
467+ PythonCpp = 3 ,
468+ }
469+ impl SdkType {
470+ /// String value of the enum field names used in the ProtoBuf definition.
471+ ///
472+ /// The values are not transformed in any way and thus are considered stable
473+ /// (if the ProtoBuf definition does not change) and safe for programmatic use.
474+ pub fn as_str_name ( & self ) -> & ' static str {
475+ match self {
476+ SdkType :: Unspecified => "SDK_TYPE_UNSPECIFIED" ,
477+ SdkType :: Go => "SDK_TYPE_GO" ,
478+ SdkType :: Typescript => "SDK_TYPE_TYPESCRIPT" ,
479+ SdkType :: PythonCpp => "SDK_TYPE_PYTHON_CPP" ,
480+ }
481+ }
482+ /// Creates an enum from field names used in the ProtoBuf definition.
483+ pub fn from_str_name ( value : & str ) -> :: core:: option:: Option < Self > {
484+ match value {
485+ "SDK_TYPE_UNSPECIFIED" => Some ( Self :: Unspecified ) ,
486+ "SDK_TYPE_GO" => Some ( Self :: Go ) ,
487+ "SDK_TYPE_TYPESCRIPT" => Some ( Self :: Typescript ) ,
488+ "SDK_TYPE_PYTHON_CPP" => Some ( Self :: PythonCpp ) ,
489+ _ => None ,
490+ }
491+ }
492+ }
493+ /// DialStage is the furthest checkpoint a WebRTC dial reached. READY means the dial succeeded; any
494+ /// earlier value is the stage at which a failed dial stopped.
495+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , PartialOrd , Ord , :: prost:: Enumeration ) ]
496+ #[ repr( i32 ) ]
497+ pub enum DialStage {
498+ Unspecified = 0 ,
499+ /// DIAL_STAGE_SIGNALING_CONNECTED: the signaling channel was established.
500+ SignalingConnected = 1 ,
501+ /// DIAL_STAGE_CONFIG_FETCHED: ICE/TURN configuration was fetched from the signaling server.
502+ ConfigFetched = 2 ,
503+ /// DIAL_STAGE_OFFER_SENT: the SDP offer was sent to the signaling server (the Call was accepted).
504+ OfferSent = 3 ,
505+ /// DIAL_STAGE_ANSWER_RECEIVED: the answerer's SDP answer was received and applied.
506+ AnswerReceived = 4 ,
507+ /// DIAL_STAGE_ICE_CONNECTED: ICE connectivity was established (a candidate pair connected).
508+ IceConnected = 5 ,
509+ /// DIAL_STAGE_DTLS_CONNECTED: the DTLS handshake completed (peer connection connected) but the
510+ /// data channel is not yet open.
511+ DtlsConnected = 6 ,
512+ /// DIAL_STAGE_READY: the connection is fully ready (data channel open). This is success.
513+ Ready = 7 ,
514+ }
515+ impl DialStage {
516+ /// String value of the enum field names used in the ProtoBuf definition.
517+ ///
518+ /// The values are not transformed in any way and thus are considered stable
519+ /// (if the ProtoBuf definition does not change) and safe for programmatic use.
520+ pub fn as_str_name ( & self ) -> & ' static str {
521+ match self {
522+ DialStage :: Unspecified => "DIAL_STAGE_UNSPECIFIED" ,
523+ DialStage :: SignalingConnected => "DIAL_STAGE_SIGNALING_CONNECTED" ,
524+ DialStage :: ConfigFetched => "DIAL_STAGE_CONFIG_FETCHED" ,
525+ DialStage :: OfferSent => "DIAL_STAGE_OFFER_SENT" ,
526+ DialStage :: AnswerReceived => "DIAL_STAGE_ANSWER_RECEIVED" ,
527+ DialStage :: IceConnected => "DIAL_STAGE_ICE_CONNECTED" ,
528+ DialStage :: DtlsConnected => "DIAL_STAGE_DTLS_CONNECTED" ,
529+ DialStage :: Ready => "DIAL_STAGE_READY" ,
530+ }
531+ }
532+ /// Creates an enum from field names used in the ProtoBuf definition.
533+ pub fn from_str_name ( value : & str ) -> :: core:: option:: Option < Self > {
534+ match value {
535+ "DIAL_STAGE_UNSPECIFIED" => Some ( Self :: Unspecified ) ,
536+ "DIAL_STAGE_SIGNALING_CONNECTED" => Some ( Self :: SignalingConnected ) ,
537+ "DIAL_STAGE_CONFIG_FETCHED" => Some ( Self :: ConfigFetched ) ,
538+ "DIAL_STAGE_OFFER_SENT" => Some ( Self :: OfferSent ) ,
539+ "DIAL_STAGE_ANSWER_RECEIVED" => Some ( Self :: AnswerReceived ) ,
540+ "DIAL_STAGE_ICE_CONNECTED" => Some ( Self :: IceConnected ) ,
541+ "DIAL_STAGE_DTLS_CONNECTED" => Some ( Self :: DtlsConnected ) ,
542+ "DIAL_STAGE_READY" => Some ( Self :: Ready ) ,
543+ _ => None ,
544+ }
545+ }
546+ }
547+ /// ConnectionSignalingPath is how a WebRTC dial was signaled, derived from the signaling address.
548+ #[ derive( Clone , Copy , Debug , PartialEq , Eq , Hash , PartialOrd , Ord , :: prost:: Enumeration ) ]
549+ #[ repr( i32 ) ]
550+ pub enum ConnectionSignalingPath {
551+ Unspecified = 0 ,
552+ /// CONNECTION_SIGNALING_PATH_CLOUD_SIGNALED: signaled through app's signaling server.
553+ CloudSignaled = 1 ,
554+ /// CONNECTION_SIGNALING_PATH_MDNS_LOCAL: signaled over an mDNS-discovered local-network path.
555+ MdnsLocal = 2 ,
556+ /// CONNECTION_SIGNALING_PATH_LOCAL: signaled through a loopback/private-address signaling server
557+ /// (e.g. a machine's own signaling server) without mDNS discovery.
558+ Local = 3 ,
559+ }
560+ impl ConnectionSignalingPath {
561+ /// String value of the enum field names used in the ProtoBuf definition.
562+ ///
563+ /// The values are not transformed in any way and thus are considered stable
564+ /// (if the ProtoBuf definition does not change) and safe for programmatic use.
565+ pub fn as_str_name ( & self ) -> & ' static str {
566+ match self {
567+ ConnectionSignalingPath :: Unspecified => "CONNECTION_SIGNALING_PATH_UNSPECIFIED" ,
568+ ConnectionSignalingPath :: CloudSignaled => "CONNECTION_SIGNALING_PATH_CLOUD_SIGNALED" ,
569+ ConnectionSignalingPath :: MdnsLocal => "CONNECTION_SIGNALING_PATH_MDNS_LOCAL" ,
570+ ConnectionSignalingPath :: Local => "CONNECTION_SIGNALING_PATH_LOCAL" ,
571+ }
572+ }
573+ /// Creates an enum from field names used in the ProtoBuf definition.
574+ pub fn from_str_name ( value : & str ) -> :: core:: option:: Option < Self > {
575+ match value {
576+ "CONNECTION_SIGNALING_PATH_UNSPECIFIED" => Some ( Self :: Unspecified ) ,
577+ "CONNECTION_SIGNALING_PATH_CLOUD_SIGNALED" => Some ( Self :: CloudSignaled ) ,
578+ "CONNECTION_SIGNALING_PATH_MDNS_LOCAL" => Some ( Self :: MdnsLocal ) ,
579+ "CONNECTION_SIGNALING_PATH_LOCAL" => Some ( Self :: Local ) ,
580+ _ => None ,
581+ }
582+ }
583+ }
378584// @@protoc_insertion_point(module)
0 commit comments