Esempio n. 1
0
        /// <summary>
        /// Sets a variable bind.
        /// </summary>
        /// <param name="endpoint">Endpoint.</param>
        /// <param name="community">Community name.</param>
        /// <param name="variable">Variable bind.</param>
        /// <returns></returns>
        public Variable SetSingle(IPEndPoint endpoint, string community, Variable variable)
        {
            var variables = new List <Variable> {
                variable
            };

            return(Messenger.Set(_version, endpoint, new OctetString(community), variables, _timeout)[0]);
        }
Esempio n. 2
0
 /// <summary>
 /// Sets a list of variable binds.
 /// </summary>
 /// <param name="endpoint">Endpoint.</param>
 /// <param name="community">Community name.</param>
 /// <param name="variables">Variable binds.</param>
 /// <returns></returns>
 public IList <Variable> Set(IPEndPoint endpoint, string community, List <Variable> variables)
 {
     return(Messenger.Set(_version, endpoint, new OctetString(community), variables, _timeout));
 }