-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
105 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System; | ||
using hakoniwa.pdu.interfaces; | ||
|
||
public class NamedPdu: INamedPdu | ||
{ | ||
private string robotName; | ||
private IPdu pdu; | ||
public NamedPdu(string robot_name, IPdu _pdu) | ||
{ | ||
this.robotName = robot_name; | ||
this.pdu = _pdu; | ||
} | ||
public string RobtName => robotName; | ||
public IPdu Pdu => pdu; | ||
public string Name => pdu.Name; | ||
public string TypeName => pdu.TypeName; | ||
public string PackageName => pdu.PackageName; | ||
|
||
public T GetData<T>(string field_name) | ||
{ | ||
return pdu.GetData<T>(field_name); | ||
} | ||
|
||
public T[] GetDataArray<T>(string field_name) | ||
{ | ||
return pdu.GetDataArray<T>(field_name); | ||
} | ||
|
||
public void SetData<T>(string field_name, T value) | ||
{ | ||
pdu.SetData<T>(field_name, value); | ||
} | ||
|
||
public void SetData<T>(string field_name, T[] value) | ||
{ | ||
pdu.SetData<T>(field_name, value); | ||
} | ||
|
||
public void SetData<T>(string field_name, int off, T value) | ||
{ | ||
pdu.SetData<T>(field_name, value); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace hakoniwa.pdu.interfaces | ||
{ | ||
public interface INamedPdu: IPdu | ||
{ | ||
string RobtName { get; } | ||
IPdu Pdu { get; } | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters