@@ -151,14 +151,16 @@ public static class BoardControllerLibrary64
151151 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
152152 public static extern int log_message_board_controller ( int log_level , string message ) ;
153153 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
154- public static extern int config_board ( string config , byte [ ] response , int [ ] len , int board_id , string input_json ) ;
154+ public static extern int config_board ( string config , byte [ ] response , int [ ] len , int max_len , int board_id , string input_json ) ;
155155 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
156156 public static extern int config_board_with_bytes ( byte [ ] bytes , int len , int board_id , string input_json ) ;
157157 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
158158 public static extern int set_log_file_board_controller ( string log_file ) ;
159159 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
160160 public static extern int get_sampling_rate ( int board_id , int preset , int [ ] sampling_rate ) ;
161161 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
162+ public static extern int get_board_sampling_rate ( int preset , int [ ] sampling_rate , int board_id , string input_json ) ;
163+ [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
162164 public static extern int get_timestamp_channel ( int board_id , int preset , int [ ] timestamp_channel ) ;
163165 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
164166 public static extern int get_marker_channel ( int board_id , int preset , int [ ] marker_channel ) ;
@@ -195,19 +197,19 @@ public static class BoardControllerLibrary64
195197 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
196198 public static extern int is_prepared ( int [ ] prepared , int board_id , string input_json ) ;
197199 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
198- public static extern int get_eeg_names ( int board_id , int preset , byte [ ] eeg_names , int [ ] len ) ;
200+ public static extern int get_eeg_names ( int board_id , int preset , byte [ ] eeg_names , int [ ] len , int max_len ) ;
199201 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
200202 public static extern int get_resistance_channels ( int board_id , int preset , int [ ] channels , int [ ] len ) ;
201203 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
202204 public static extern int get_magnetometer_channels ( int board_id , int preset , int [ ] channels , int [ ] len ) ;
203205 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
204206 public static extern int get_exg_channels ( int board_id , int preset , int [ ] channels , int [ ] len ) ;
205207 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
206- public static extern int get_device_name ( int board_id , int preset , byte [ ] name , int [ ] len ) ;
208+ public static extern int get_device_name ( int board_id , int preset , byte [ ] name , int [ ] len , int max_len ) ;
207209 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
208210 public static extern int insert_marker ( double value , int preset , int board_id , string input_json ) ;
209211 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
210- public static extern int get_board_descr ( int board_id , int preset , byte [ ] board_descr , int [ ] len ) ;
212+ public static extern int get_board_descr ( int board_id , int preset , byte [ ] board_descr , int [ ] len , int max_len ) ;
211213 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
212214 public static extern int release_all_sessions ( ) ;
213215 [ DllImport ( "BoardController" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
@@ -241,14 +243,16 @@ public static class BoardControllerLibrary32
241243 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
242244 public static extern int log_message_board_controller ( int log_level , string message ) ;
243245 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
244- public static extern int config_board ( string config , byte [ ] response , int [ ] len , int board_id , string input_json ) ;
246+ public static extern int config_board ( string config , byte [ ] response , int [ ] len , int max_len , int board_id , string input_json ) ;
245247 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
246248 public static extern int config_board_with_bytes ( byte [ ] bytes , int len , int board_id , string input_json ) ;
247249 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
248250 public static extern int set_log_file_board_controller ( string log_file ) ;
249251 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
250252 public static extern int get_sampling_rate ( int board_id , int preset , int [ ] sampling_rate ) ;
251253 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
254+ public static extern int get_board_sampling_rate ( int preset , int [ ] sampling_rate , int board_id , string input_json ) ;
255+ [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
252256 public static extern int get_timestamp_channel ( int board_id , int preset , int [ ] timestamp_channel ) ;
253257 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
254258 public static extern int get_marker_channel ( int board_id , int preset , int [ ] marker_channel ) ;
@@ -285,17 +289,17 @@ public static class BoardControllerLibrary32
285289 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
286290 public static extern int is_prepared ( int [ ] prepared , int board_id , string input_json ) ;
287291 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
288- public static extern int get_eeg_names ( int board_id , int preset , byte [ ] eeg_names , int [ ] len ) ;
292+ public static extern int get_eeg_names ( int board_id , int preset , byte [ ] eeg_names , int [ ] len , int max_len ) ;
289293 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
290294 public static extern int get_resistance_channels ( int board_id , int preset , int [ ] channels , int [ ] len ) ;
291295 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
292296 public static extern int get_exg_channels ( int board_id , int preset , int [ ] channels , int [ ] len ) ;
293297 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
294- public static extern int get_device_name ( int board_id , int preset , byte [ ] name , int [ ] len ) ;
298+ public static extern int get_device_name ( int board_id , int preset , byte [ ] name , int [ ] len , int max_len ) ;
295299 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
296300 public static extern int insert_marker ( double value , int preset , int board_id , string input_json ) ;
297301 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
298- public static extern int get_board_descr ( int board_id , int preset , byte [ ] board_descr , int [ ] len ) ;
302+ public static extern int get_board_descr ( int board_id , int preset , byte [ ] board_descr , int [ ] len , int max_len ) ;
299303 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
300304 public static extern int release_all_sessions ( ) ;
301305 [ DllImport ( "BoardController32" , SetLastError = true , CallingConvention = CallingConvention . Cdecl ) ]
@@ -457,14 +461,14 @@ public static int insert_marker (double value, int preset, int board_id, string
457461 }
458462
459463
460- public static int config_board ( string config , byte [ ] str , int [ ] len , int board_id , string input_json )
464+ public static int config_board ( string config , byte [ ] str , int [ ] len , int max_len , int board_id , string input_json )
461465 {
462466 switch ( PlatformHelper . get_library_environment ( ) )
463467 {
464468 case LibraryEnvironment . x64 :
465- return BoardControllerLibrary64 . config_board ( config , str , len , board_id , input_json ) ;
469+ return BoardControllerLibrary64 . config_board ( config , str , len , max_len , board_id , input_json ) ;
466470 case LibraryEnvironment . x86 :
467- return BoardControllerLibrary32 . config_board ( config , str , len , board_id , input_json ) ;
471+ return BoardControllerLibrary32 . config_board ( config , str , len , max_len , board_id , input_json ) ;
468472 }
469473
470474 return ( int ) BrainFlowExitCodes . GENERAL_ERROR ;
@@ -535,6 +539,19 @@ public static int get_sampling_rate (int board_id, int preset, int[] sampling_ra
535539 return ( int ) BrainFlowExitCodes . GENERAL_ERROR ;
536540 }
537541
542+ public static int get_board_sampling_rate ( int preset , int [ ] sampling_rate , int board_id , string input_json )
543+ {
544+ switch ( PlatformHelper . get_library_environment ( ) )
545+ {
546+ case LibraryEnvironment . x64 :
547+ return BoardControllerLibrary64 . get_board_sampling_rate ( preset , sampling_rate , board_id , input_json ) ;
548+ case LibraryEnvironment . x86 :
549+ return BoardControllerLibrary32 . get_board_sampling_rate ( preset , sampling_rate , board_id , input_json ) ;
550+ }
551+
552+ return ( int ) BrainFlowExitCodes . GENERAL_ERROR ;
553+ }
554+
538555 public static int get_package_num_channel ( int board_id , int preset , int [ ] package_num )
539556 {
540557 switch ( PlatformHelper . get_library_environment ( ) )
@@ -600,14 +617,14 @@ public static int get_marker_channel (int board_id, int preset, int[] marker_cha
600617 return ( int ) BrainFlowExitCodes . GENERAL_ERROR ;
601618 }
602619
603- public static int get_eeg_names ( int board_id , int preset , byte [ ] names , int [ ] len )
620+ public static int get_eeg_names ( int board_id , int preset , byte [ ] names , int [ ] len , int max_len )
604621 {
605622 switch ( PlatformHelper . get_library_environment ( ) )
606623 {
607624 case LibraryEnvironment . x64 :
608- return BoardControllerLibrary64 . get_eeg_names ( board_id , preset , names , len ) ;
625+ return BoardControllerLibrary64 . get_eeg_names ( board_id , preset , names , len , max_len ) ;
609626 case LibraryEnvironment . x86 :
610- return BoardControllerLibrary32 . get_eeg_names ( board_id , preset , names , len ) ;
627+ return BoardControllerLibrary32 . get_eeg_names ( board_id , preset , names , len , max_len ) ;
611628 }
612629
613630 return ( int ) BrainFlowExitCodes . GENERAL_ERROR ;
@@ -626,27 +643,27 @@ public static int get_board_presets (int board_id, int[] names, int[] len)
626643 return ( int ) BrainFlowExitCodes . GENERAL_ERROR ;
627644 }
628645
629- public static int get_board_descr ( int board_id , int preset , byte [ ] descr , int [ ] len )
646+ public static int get_board_descr ( int board_id , int preset , byte [ ] descr , int [ ] len , int max_len )
630647 {
631648 switch ( PlatformHelper . get_library_environment ( ) )
632649 {
633650 case LibraryEnvironment . x64 :
634- return BoardControllerLibrary64 . get_board_descr ( board_id , preset , descr , len ) ;
651+ return BoardControllerLibrary64 . get_board_descr ( board_id , preset , descr , len , max_len ) ;
635652 case LibraryEnvironment . x86 :
636- return BoardControllerLibrary32 . get_board_descr ( board_id , preset , descr , len ) ;
653+ return BoardControllerLibrary32 . get_board_descr ( board_id , preset , descr , len , max_len ) ;
637654 }
638655
639656 return ( int ) BrainFlowExitCodes . GENERAL_ERROR ;
640657 }
641658
642- public static int get_device_name ( int board_id , int preset , byte [ ] name , int [ ] len )
659+ public static int get_device_name ( int board_id , int preset , byte [ ] name , int [ ] len , int max_len )
643660 {
644661 switch ( PlatformHelper . get_library_environment ( ) )
645662 {
646663 case LibraryEnvironment . x64 :
647- return BoardControllerLibrary64 . get_device_name ( board_id , preset , name , len ) ;
664+ return BoardControllerLibrary64 . get_device_name ( board_id , preset , name , len , max_len ) ;
648665 case LibraryEnvironment . x86 :
649- return BoardControllerLibrary32 . get_device_name ( board_id , preset , name , len ) ;
666+ return BoardControllerLibrary32 . get_device_name ( board_id , preset , name , len , max_len ) ;
650667 }
651668
652669 return ( int ) BrainFlowExitCodes . GENERAL_ERROR ;
0 commit comments