如何使用abcl函数查找将有效载荷从十六进制转换为dec的库

问题描述 投票:-1回答:1

对于我的项目,我需要将来自lorasensor的数据保存在oracle数据库中。这些数据以十六进制形式保存在有效载荷值中。问题来了。我必须使用ABCL(AllThingsTalk二进制转换语言)将十六进制值转换为十进制值,并且需要找到合适的库(开源)。我到处看,但找不到。有人可以帮我吗?

因此,我必须使用AllThingsTalk二进制转换语言中的assert算法,并使用我找不到的正确的AllThingsTalk二进制转换语言库将其放入我的c#代码中。有人可以帮我吗?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Payload
{
    class Program
    {
        static void Main(string[] args)
        {
            string Input;
            Console.WriteLine("Enter a Hexadecimal Number :");
            Input = Console.ReadLine();



                       int Output = {
  "sense": [
    {
      "asset": "battery",
      "value": {
        "byte": 0,
        "bytelength": 2,
        "type": "integer"
      }
},
    {
      "asset": "temperature",
      "value": {
        "byte": 4,
        "bytelength": 2,
        "type": "integer",
        "calculation": "val/100"
      }
    }
  ]
}

        }
    }
}
c# oracle
1个回答
0
投票

所以我正在寻找这样的东西:此代码无效

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Payload
{
    class Program
    {
        static void Main(string[] args)
        {
            string Input;
            Console.WriteLine("Enter a Hexadecimal Number :");
            Input = Console.ReadLine();



                       int Output = {
  "sense": [
    {
      "asset": "battery",
      "value": {
        "byte": 0,
        "bytelength": 2,
        "type": "integer"
      }
},
    {
      "asset": "temperature",
      "value": {
        "byte": 4,
        "bytelength": 2,
        "type": "integer",
        "calculation": "val/100"
      }
    }
  ]
}

        }
    }
}
© www.soinside.com 2019 - 2024. All rights reserved.