/// <summary>
        /// 获取当前系统进程使用率
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JT808HttpResponse SystemCollectGet(JT808HttpRequest request)
        {
            JT808ResultDto <JT808SystemCollectInfoDto> jT808ResultDto = new JT808ResultDto <JT808SystemCollectInfoDto>();

            jT808ResultDto.Data = jT808SimpleSystemCollectService.Get();
            return(CreateJT808HttpResponse(jT808ResultDto));
        }
Exemple #2
0
 /// <summary>
 /// 通过终端手机号查询对应会话
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public JT808HttpResponse QueryTcpSessionByTerminalPhoneNo(JT808HttpRequest request)
 {
     if (string.IsNullOrEmpty(request.Json))
     {
         return(EmptyHttpResponse());
     }
     return(CreateJT808HttpResponse(jT808SessionService.GetTcpAll()));
 }
 /// <summary>
 /// 删除转发过滤地址(不能删除在网关服务器配置文件配的地址)
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public JT808HttpResponse RemoveTransmitAddress(JT808HttpRequest request)
 {
     if (string.IsNullOrEmpty(request.Json))
     {
         return(EmptyHttpResponse());
     }
     return(CreateJT808HttpResponse(jT808TransmitAddressFilterService.Remove(request.Json)));
 }
        /// <summary>
        /// 基于Udp的流量获取
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JT808HttpResponse TrafficUdpGet(JT808HttpRequest request)
        {
            JT808ResultDto <JT808TrafficInfoDto> jT808ResultDto = new JT808ResultDto <JT808TrafficInfoDto>();

            jT808ResultDto.Data = new JT808TrafficInfoDto();
            jT808ResultDto.Data.TotalReceiveSize = (jT808UdpTrafficService.TotalReceiveSize * 1.0) / 1024;
            jT808ResultDto.Data.TotalSendSize    = (jT808UdpTrafficService.TotalSendSize * 1.0) / 1024;
            return(CreateJT808HttpResponse(jT808ResultDto));
        }
        /// <summary>
        /// 删除转发过滤地址(不能删除在网关服务器配置文件配的地址)
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JT808HttpResponse RemoveTransmitAddress(JT808HttpRequest request)
        {
            if (string.IsNullOrEmpty(request.Json))
            {
                return(EmptyHttpResponse());
            }
            JT808IPAddressDto jT808IPAddressDto = JsonConvert.DeserializeObject <JT808IPAddressDto>(request.Json);

            return(CreateJT808HttpResponse(jT808TransmitAddressFilterService.Remove(jT808IPAddressDto)));
        }
        /// <summary>
        /// 会话服务-通过设备终端号移除对应会话
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JT808HttpResponse RemoveUdpSessionByTerminalPhoneNo(JT808HttpRequest request)
        {
            if (string.IsNullOrEmpty(request.Json))
            {
                return(EmptyHttpResponse());
            }
            var result = jT808UdpSessionService.RemoveByTerminalPhoneNo(request.Json);

            return(CreateJT808HttpResponse(result));
        }
Exemple #7
0
        /// <summary>
        /// 删除原包转发地址(不能删除在网关服务器配置文件配的地址)
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JT808HttpResponse RemoveSourcePackageAddress(JT808HttpRequest request)
        {
            if (string.IsNullOrEmpty(request.Json))
            {
                return(EmptyHttpResponse());
            }
            JT808IPAddressDto jT808IPAddressDto = JsonConvert.DeserializeObject <JT808IPAddressDto>(request.Json);

            return(CreateJT808HttpResponse(jT808SourcePackageChannelService.Remove(jT808IPAddressDto).Result));
        }
Exemple #8
0
        /// <summary>
        /// 会话服务-通过通道Id移除对应会话
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JT808HttpResponse RemoveByChannelId(JT808HttpRequest request)
        {
            if (string.IsNullOrEmpty(request.Json))
            {
                return(EmptyHttpResponse());
            }
            var result = jT808SessionService.RemoveByChannelId(request.Json);

            return(CreateJT808HttpResponse(result));
        }
        /// <summary>
        /// 基于Udp的统一下发信息
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JT808HttpResponse UnificationUdpSend(JT808HttpRequest request)
        {
            if (string.IsNullOrEmpty(request.Json))
            {
                return(EmptyHttpResponse());
            }
            JT808UnificationSendRequestDto jT808UnificationSendRequestDto = JsonConvert.DeserializeObject <JT808UnificationSendRequestDto>(request.Json);
            var result = jT808UnificationUdpSendService.Send(jT808UnificationSendRequestDto.TerminalPhoneNo, jT808UnificationSendRequestDto.Data);

            return(CreateJT808HttpResponse(result));
        }
        /// <summary>
        /// 获取Udp包计数器
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JT808HttpResponse GetUdpAtomicCounter(JT808HttpRequest request)
        {
            JT808AtomicCounterDto jT808AtomicCounterDto = new JT808AtomicCounterDto();

            jT808AtomicCounterDto.MsgFailCount    = jT808UdpAtomicCounterService.MsgFailCount;
            jT808AtomicCounterDto.MsgSuccessCount = jT808UdpAtomicCounterService.MsgSuccessCount;
            return(CreateJT808HttpResponse(new JT808ResultDto <JT808AtomicCounterDto>
            {
                Code = JT808ResultCode.Ok,
                Data = jT808AtomicCounterDto
            }));
        }
 /// <summary>
 /// 获取转发过滤地址信息集合
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public JT808HttpResponse GetTransmitAll(JT808HttpRequest request)
 {
     return(CreateJT808HttpResponse(jT808TransmitAddressFilterService.GetAll()));
 }
        /// <summary>
        /// 会话服务集合
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public JT808HttpResponse GetUdpSessionAll(JT808HttpRequest request)
        {
            var result = jT808UdpSessionService.GetAll();

            return(CreateJT808HttpResponse(result));
        }
Exemple #13
0
 /// <summary>
 /// 获取原包信息集合
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public JT808HttpResponse GetSourcePackageAll(JT808HttpRequest request)
 {
     return(CreateJT808HttpResponse(jT808SourcePackageChannelService.GetAll()));
 }