예제 #1
0
        /// <summary>
        /// ゲートウェイ機器にメッセージを送信する(ラッパー)
        /// </summary>
        /// <param name="deveiceConnectionInfo">デバイス接続情報</param>
        /// <param name="deliveryMessage">配信メッセージ</param>
        /// <param name="gatewayDevice">ゲートウェイ機器</param>
        /// <returns>送信依頼処理成功/失敗</returns>
        private async Task <bool> SendMessageAsyncWrapper(DeviceConnectionInfo deveiceConnectionInfo, string deliveryMessage, DtDevice gatewayDevice)
        {
            bool ret = false;

            try
            {
                await _requestDeviceRepository.SendMessageAsync(deveiceConnectionInfo, deliveryMessage);

                ret = true;
            }
            catch (Exception e)
            {
                // Sq1.6
                _logger.Error(e, nameof(Resources.CO_DLV_DLV_015), new object[] { gatewayDevice.EdgeId, gatewayDevice.EquipmentUid, e.Message });
            }

            return(ret);
        }