• R/O
  • HTTP
  • SSH
  • HTTPS

yubeshi: Commit

source codes and tests


Commit MetaInfo

Revision54cf421fe96698a92ce3ccde101d662d13d3fe3e (tree)
Time2011-02-24 21:19:06
Authorkimikage <kimikage_ceo@hotm...>
Commiterkimikage

Log Message

Subframeの実装と非抽象クラス化

Change Summary

Incremental Difference

--- a/Yubeshi/Gps/Subframe.cs
+++ b/Yubeshi/Gps/Subframe.cs
@@ -11,16 +11,43 @@ using System.Text;
1111
1212 namespace Yubeshi.Gps
1313 {
14- public abstract class Subframe
14+ public class Subframe
1515 {
16- #region fields
17- protected Word[] words;
18- #endregion
16+ #region constructors
17+
18+ public Subframe(Subframe frame)
19+ {
20+ Words = frame.Words;
21+ }
1922
20- #region constructor
2123 public Subframe(Word[] words)
2224 {
23- this.words = words;
25+ Words = words;
26+ }
27+
28+ public Subframe(byte[] raw)
29+ {
30+ Words = new Word[raw.Length / 4];
31+ for (int i = 0; i < Words.Length; ++i)
32+ {
33+ Words[i] = BitConverter.ToUInt32(raw, i * 4);
34+ }
35+ }
36+
37+
38+ protected Subframe()
39+ {
40+ Words = null;
41+ }
42+
43+ #endregion
44+
45+ #region properties
46+
47+ public Word[] Words
48+ {
49+ get;
50+ protected set;
2451 }
2552
2653 #endregion
Show on old repository browser