public static void Write(XBeeApi sender, XBeeAddress remoteXbee, ApiModes mode) { var request = sender.Send(AtCmd.ApiEnable, new[] {(byte) mode}).To(remoteXbee); var response = (AtResponse) request.GetResponse(); if (!response.IsOk) throw new XBeeException("Failed to write api mode"); }
public static void Write(XBeeApi xbee, ApiModes mode) { var request = xbee.Send(AtCmd.ApiEnable, new[] {(byte) mode}); var response = request.GetResponse(); if (!response.IsOk) throw new XBeeException("Failed to write api mode"); }
public static void Write(XBeeApi sender, XBeeAddress remoteXbee, ApiModes mode) { var request = sender.Send(AtCmd.ApiEnable, new[] { (byte)mode }).To(remoteXbee); var response = (AtResponse)request.GetResponse(); if (!response.IsOk) { throw new XBeeException("Failed to write api mode"); } }
public static void Write(XBeeApi xbee, ApiModes mode) { var request = xbee.Send(AtCmd.ApiEnable, new[] { (byte)mode }); var response = request.GetResponse(); if (!response.IsOk) { throw new XBeeException("Failed to write api mode"); } }
public void SetApiMode(ApiModes apiMode) { if (_remoteXbee != null) { Common.ApiMode.Write(_xbee, _remoteXbee, apiMode); } else { Common.ApiMode.Write(_xbee, apiMode); } ApiMode = apiMode; }
public async Task InitializeAsync() { if (_storageHelper.KeyExists(current_api_key)) { var config = _storageHelper.Read <ApiConfig>(current_api_key); CurrentApiMode = ApiModes.FirstOrDefault(i => i.ApiConfig == config); } if (CurrentApiMode == null) { CurrentApiMode = ApiModes.First(); _storageHelper.Save(current_api_key, CurrentApiMode.ApiConfig); } await rebuildForumListAsync(CurrentApiMode.ApiConfig); }
public static string GetName(ApiModes apiMode) { return((string)ApiModeNames[apiMode]); }
public static string GetName(ApiModes apiMode) { return (string)ApiModeNames[apiMode]; }