dymutil.h 888 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* dymutil.h
  2. *
  3. * Declarations of utility functions for Dymosim.
  4. *
  5. * Author: Hilding Elmqvist, Dynasim AB, 1995-02-21
  6. * Version: 1.0, 1996-11-01
  7. *
  8. */
  9. /*
  10. * Copyright (C) 1995-2001 Dynasim AB.
  11. * All rights reserved.
  12. *
  13. */
  14. #ifndef DYMUTIL_H
  15. #define DYMUTIL_H
  16. /* To make functions and variabled static to allow several S-function blocks
  17. for real-time targets */
  18. #if !defined(DYMOLA_STATIC)
  19. #if defined(__cplusplus)
  20. #define DYMOLA_STATIC extern
  21. #elif defined(RT) && !defined(DYM2DS)
  22. #define DYMOLA_STATIC static
  23. #else
  24. #define DYMOLA_STATIC
  25. #endif
  26. #endif
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. DYMOLA_STATIC void DymosimMessage(const char* message);
  31. DYMOLA_STATIC void DymosimMessageDouble(const char* message, double d);
  32. DYMOLA_STATIC void DymosimMessageInt(const char* message, int i);
  33. DYMOLA_STATIC double DymosimError(const char* message);
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37. #endif