コード例 #1
0
ファイル: DPTTranslator.cs プロジェクト: tcharp/knx.net
 public byte[] toDPT(string type, object value)
 {
     try
     {
         if (dpts.ContainsKey(type))
         {
             IDpt dpt = dpts[type];
             return(dpt.toDPT(value));
         }
     }
     catch (Exception)
     {
     }
     return(null);
 }
コード例 #2
0
ファイル: DPTTranslator.cs プロジェクト: tcharp/knx.net
 public object fromDPT(string type, byte[] data)
 {
     try
     {
         if (dpts.ContainsKey(type))
         {
             IDpt dpt = dpts[type];
             return(dpt.fromDPT(data));
         }
     }
     catch (Exception)
     {
     }
     return(null);
 }