int GetStreamData_LXDeviceAPI(unsigned int message_wparam);


Parameter Available Value Description
unsigned int message_wparam
  • (unsigned int)wParam
The parameter wParam from application’s message handler function.

Return Values

Return  meaning Description
 1  Success
 -3  Fail. No device(correspond to int device_handling_id).
 -10  Fail. Wrong calling order. GetStreamData should be called after OpenApi.

Code Example

afx_msg LRESULT CLXDeviceAPI_Sample1View::OnStreamData(WPARAM wParam, LPARAM lParam)
 unsigned int uintWPARAM = (unsigned int)wParam; 
 unsigned char msgtype_id = (unsigned char)(uintWPARAM >> 8)  ; //get the lowest 2'nd byte(message type id).
 unsigned char msgtype_subid = (unsigned char)(uintWPARAM); //get the lowest 1st byte(message type sub id).

 switch (msgtype_id)
 case MSGTYPEID0_DEVICE_LXDAPI: // for real time stream type messages. 

  switch (msgtype_subid)
  case 0:

   GetStreamData_LXDeviceAPI(uintWPARAM); // After call this function. the new stream data is allocated on stStreamData which is ST_STREAMDATA_LXDAPI type variable.  

   /// Data arrange for Wave Stream Data for plotting. 
   for (int i = 0; i < NumSampleReturn * NumChannel; i++)
    testfloat_Wave[i] = (float)stStreamData.Wave_StreamData_CS[i];

   /// Data arrange for Event Marking for plotting.
   for (int idx_event = 0; idx_event < NumSampleReturn; idx_event++)
    testfloat_Wave[NumSampleReturn * NumChannel + idx_event] = (float)stStreamData.Event_StreamData_CS[idx_event];

   // Plotting the wave and event marking. 
   ACQPLOT_DLL_Array_Datain_Strip(testfloat_Wave, NumChannel + 1, NumSampleReturn); //인자의미. 1번 :float형 파형 데이터배열의 포인터, 2번인자 : 총 채널수 +1 for Event Marking, 1채널당 샘플링 수량.


  } // switch (msgtype_subid)

  break;  // case MSGTYPEID0_DEVICE_LXDAPI: // for real time stream type messages. 
 }// switch (msgtype_id)

 return 0;