generated from ni/github-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add array.proto for Double 2D array support (#71)
Signed-off-by: Rajat Kumar <[email protected]> Co-authored-by: Joel Dixon <[email protected]>
- Loading branch information
1 parent
ebcd017
commit c00cd3c
Showing
1 changed file
with
47 additions
and
0 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,47 @@ | ||
//--------------------------------------------------------------------- | ||
//--------------------------------------------------------------------- | ||
syntax = "proto3"; | ||
|
||
//--------------------------------------------------------------------- | ||
//--------------------------------------------------------------------- | ||
package ni.protobuf.types; | ||
|
||
//--------------------------------------------------------------------- | ||
//--------------------------------------------------------------------- | ||
option csharp_namespace = "NationalInstruments.Protobuf.Types"; | ||
option go_package = "types"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "ArrayProto"; | ||
option java_package = "com.ni.protobuf.types"; | ||
option objc_class_prefix = "NIPT"; | ||
option php_namespace = "NI\\PROTOBUF\\TYPES"; | ||
option ruby_package = "NI::Protobuf::Types"; | ||
|
||
//--------------------------------------------------------------------- | ||
// Defines a 2D array of double values. The 2D array is stored as | ||
// a repeated double, a 1D array. It is stored in row major order. | ||
// | ||
// Example: | ||
// Repeated Double: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | ||
// rows: 2 | ||
// columns: 5 | ||
// | ||
// 2D Representation: | ||
// 1 2 3 4 5 | ||
// 6 7 8 9 10 | ||
// | ||
// Indices: | ||
// (0,0) (0,1) (0,2) (0,3) (0,4) | ||
// (1,0) (1,1) (1,2) (1,3) (1,4) | ||
// | ||
// Remarks: | ||
// The length of the 'data' field must be equal to rows * columns. | ||
// If it is not, implementations should treat this state as invalid | ||
// and return INVALID_ARGUMENT status code if appropriate. | ||
//--------------------------------------------------------------------- | ||
message Double2DArray | ||
{ | ||
int32 rows = 1; | ||
int32 columns = 2; | ||
repeated double data = 3; | ||
} |