This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC1310:15.4 SDK CC1310

Guru**** 2484615 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1196136/cc1310-15-4-sdk-cc1310

器件型号:CC1310

目前使用 的是 SimpleLink CC13x0 SDK (4.20.02.07)、我将按照15.4 add 传感器培训向传感器添加其他数据。 部分培训要求您将  以下代码部分添加到"sensor.c"文件中。 当我尝试编译时、由于工程中不存在某些函数、我会遇到编译错误。 例如,函数  Jdllc_getProvState()应该 在"jdlc.c"中,但函数不在那里。 然后、我在  SimpleLink CC13xx CC26xx SDK (6.40.00.13)的传感器示例中比较了相同的"jdlc.c"、并且该工程不会在构建时出现以下代码添加问题。 如何解决此问题?

case Smsgs_cmdIds_DeviceTypeReq:
/* Make sure the message is the correct size */
   if(pDataInd->msdu.len == SMSGS_DEVICE_TYPE_REQUEST_MSG_LEN)
  {
      /* Only send data if sensor is in the network */
      if ((Jdllc_getProvState() == Jdllc_states_joined) ||
              (Jdllc_getProvState() == Jdllc_states_rejoined))
      {
          Sensor_sendDeviceTypeResponse();
      }
  }
  break;
case Smsgs_cmdIds_genericReq:
  if(pDataInd->msdu.len == SMSGS_GENERIC_REQUEST_MSG_LEN)
  {
      /* send the response message directly */
      cmdBytes[0] = (uint8_t) Smsgs_cmdIds_genericRsp;
      cmdBytes[1] = Ssf_genericCMD();
      Sensor_sendMsg(Smsgs_cmdIds_genericRsp,
              &pDataInd->srcAddr, true,
              SMSGS_GENERIC_RESPONSE_MSG_LEN,
              cmdBytes);

  }
  break;