コード例 #1
0
ファイル: c2_mdl5.c プロジェクト: yoshihiro-ikeda/labfile
static int32_T c2__s32_add__(SFc2_mdl5InstanceStruct *chartInstance, int32_T
  c2_b, int32_T c2_c)
{
  int32_T c2_a;
  (void)chartInstance;
  c2_a = c2_b + c2_c;
  if (((c2_a ^ c2_b) & (c2_a ^ c2_c)) < 0) {
    _SFD_OVERFLOW_DETECTION(SFDB_OVERFLOW);
  }

  return c2_a;
}
コード例 #2
0
static int32_T c3__s32_add__(SFc3_MON_FunctionalInstanceStruct *chartInstance,
  int32_T c3_b, int32_T c3_b_c, uint32_T c3_ssid, int32_T c3_offset, int32_T
  c3_length)
{
  int32_T c3_a;
  c3_a = c3_b + c3_b_c;
  if (((c3_a ^ c3_b) & (c3_a ^ c3_b_c)) < 0) {
    _SFD_OVERFLOW_DETECTION(SFDB_OVERFLOW, 1U, c3_ssid, c3_offset, c3_length, 0U,
      chartInstance->c3_sfEvent, false);
  }

  return c3_a;
}