Esempio n. 1
0
        public static async ValueTask <RosChannelReader> CreateReaderAsync(this IRosClient client, string topic,
                                                                           CancellationToken token = default)
        {
            var writer = new RosChannelReader();
            await writer.StartAsync(client, topic, token);

            return(writer);
        }
Esempio n. 2
0
        public static async ValueTask <RosChannelReader <T> > CreateReaderAsync <T>(this IRosClient client, string topic,
                                                                                    CancellationToken token = default)
            where T : IMessage, IDeserializable <T>, new()
        {
            var writer = new RosChannelReader <T>();
            await writer.StartAsync(client, topic, token);

            return(writer);
        }