1. 25 Jan, 2020 1 commit
    • George Nash's avatar
      Add OC_STORAGE define that is set in oc_config.h · b0e9dac7
      George Nash authored
      Persistant storage is currently only enabled if OC_SECURITY
      is defined.  This has lead implementation problems when
      implementing features like introspection, cloud, or
      software-update which also require persistant storage.
      This commit replaces the `#ifdef OC_SECURITY` with
      `#ifdef OC_STORAGE` in oc_storage.c.
      Inside config.h OC_STORAGE is defined if OC_SECURITY, OC_IDD_API
      OC_SOFTWARE_UPDATE, or OC_SECURITY is defined.
      Also updated samples that call oc_storage_config so they call it
      if OC_STORAGE is defined instead of OC_SECURITY.
      Removed the dummy storage implmentation from the
      oc_cloud_storage.c since OC_STORAGE is now defined by default
      when OC_CLOUD is defined.
      Some preprocessor check were added to check it one of the
      features that require OC_STORAGE is set but OC_STORAGE is not
      set. This will cause a build error and inform developers to
      check oc_config.h to make sure OC_STORAGE is set there.
      Change-Id: I9a9242349e939393f190cab373fe7d0252ae656c
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
  2. 13 Nov, 2019 1 commit
  3. 10 Jun, 2019 1 commit
    • George Nash's avatar
      Fixed build warnings · 822ab4a2
      George Nash authored
      Fixed multiple build warnings for using %d for values
      that are larger than an int.
      All the warnings were related to print statments or
      Change-Id: I5d09d220d85a5cd526061ad6f2f8f72afda21368
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
  4. 19 Mar, 2019 1 commit
    • Kishen Maloor's avatar
      Update oc_rep API · f6203572
      Kishen Maloor authored
      * Store an int64_t in oc_rep_t for integer values. This addresses
        bug LITE-32 which points out that OCF Specs permit values
        in the range [-2^53,2^53] for integers in OCF's data models.
      * Add value setter APIs e.g.: oc_rep_set_value_int() for supported
        value types to allow apps to use in conjunction with oc_rep_set_key()
        to encode objects where keys and values are supplied at runtime through
      * Modified oc_rep_{begin/end}_{object/array}() macros to allow callers to
        directly pass in a pointer to the "parent" parameter. This change also
        makes code look cleaner.
      * Updated all sample apps and modules across the stack that were impacted
        by the above changes.
      Change-Id: I9e43a1b87b8f9504ca6524c393700a92dcfd1378
      Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
      Reviewed-on: https://gerrit.iotivity.org/gerrit/29341Tested-by: default avatarIoTivity Jenkins <jenkins-daemon@iotivity.org>
  5. 31 Jan, 2019 1 commit
    • George Nash's avatar
      Rename instances of `interface` · 78448ebb
      George Nash authored
      Due to windows defining the word `interface` to `struct`
      (i.e. `#define interface struct` ) in the basetypes.h header file
      that is pulled in when including windows.h. For this reason  all code
      that is going to be compiled on Windows must treat the variable
      `interface` as a keyword.
      This commit will change most of the locations that `interface` was
      used as a parameter or variable name. In most places in the code the
      parameter or variable `interfaces` (with an `s`) was also changed to
      `iface_mask` even though `interfaces` is not a problem on Windows
      the rename was so it would remain consistant accross the code base.
      The most important locations the change was made was in the header
      files. I have already run into problems on Windows when trying to
      include the header files and windows.h in the same code.
      It is important to rename the variable in samples/test code.
      Developers often copy past from samples when developing there
      own software. For this reason the most lines of code changed were
      actually in the samples.
      Change-Id: Ia98cceb0a588428f86aae2c9014dded746e45a3e
      Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
      Reviewed-on: https://gerrit.iotivity.org/gerrit/27868Tested-by: default avatarIoTivity Jenkins <jenkins-daemon@iotivity.org>
      Reviewed-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
  6. 15 Feb, 2018 1 commit
  7. 14 Dec, 2017 1 commit
  8. 12 Oct, 2017 1 commit
  9. 26 Jul, 2017 1 commit
    • Kishen Maloor's avatar
      OCF 1.0 discovery, endpoints, multi-device support · 45d912ef
      Kishen Maloor authored
      This commit brings in many significant changes to the
      handling and processing of discovery requests and
      responses, and also aligns the resource architecture and
      core representations to the OCF 1.0 specification.
      It adds support for OCF 1.0 endpoints to interpret the
      the coap and coaps schemes over IPv4/v6 with platform
      neutral functions to convert IPv4/v6 addresses to/from
      strings and the ability to construct and maintain lists of
      endpoint descriptions for a remote entity by allocating
      from a pool of endpoint structures in both the
      server/client roles.
      In keeping with OCF resource model concepts of a platform
      with logical devices, this commit adds support for the
      definition of multiple virtual servers with an
      application that reside on a single platform.
      Virtual servers are bound to different ports and behave
      as independent entities, separately handling requests.
      All virtual servers expose the required set of core OCF
      resources (oic/res, oic/d, oic/con, security resources, etc.),
      but share a single oic/p resource corresponding to the underlying
      platform. Virtual servers would each have to be independently
      onboarded and provisioned in the security context in order
      for their resources to be accessed. Application resources
      are instantiated and bound to a specific logical device
      in the application, and resource handlers are made aware of
      their hosting device. This design is usually employed in
      a bridging scenario with OCF.
      The new multi_device_server/multi_device_client samples
      for Linux illustrate these concepts in action.
      Logical devices are defined using the oc_add_device() API
      and are identified by their zero based index in the order
      of oc_add_device() calls.
      Internal APIs now take the device index as the parameter.
      The interfaces to initialize and teardown
      connectivity also take device index as a parameter. The
      expectation is that implementations that wish to support
      multiple logical devices would allocate the required
      set of resources to hold multiple sets of handles, port
      numbers, addresses etc., one set for each logical device.
      A new interface to obtain the set of endpoints hosting
      a logical device must be realized in connectivity
      implementations, and is invoked in the discovery resource
      handler to populate the "eps" parameter.
      The Linux IP adapter incorporates full support for
      defining multiple logical devices by implementing the new
      interfaces, where each logical device maintains
      secured/unsecured ports over IPv6, and optionally over
      IPv4. The IP adapters for constrained OSes have been updated
      to return the list of endpoints, but continue to handle
      only a single logical device, as would be expected for
      constrained platforms.
      The build with security is NOT functional at the moment
      and has yet to be updated for OCF 1.0 security.
      However, the above changes were successfully tested for
      interoperability with IoTivity 1.3 (master) using the
      OCF 1.0 scheme and by running the simpleclient/simpleserver
      Additional notes:
      -Clients are now upon successful discovery handed a
      linked list of oc_endpoint_t structures that they may use to
      reach a server. This eliminates the oc_server_handle_t
      structure and all client APIs instead accept an oc_endpoin_t
      handle. These oc_endpoint_t structures are allocated from
      a pool, and the oc_free_server_endpoints() API may be used
      to free all server endpoints back to the poool when the client
      has no more interest to contact the server.
      -The handler for collections has been updated to include the
      “eps” property containing the list of endpoints to reach
      a referenced resource in a link.
      -The oic/d handler now returns the pid property containing
      a UUID.
      -The default OC_MAX_APP_DATA_SIZE for dynamic builds has been
      raised to 8192 bytes.
      -oc_connectivity_init() for each logical device is invoked
      through every oc_add_device() call.
      -Elimination of duplicate requests now happens by checking
      both the message id and logical device index.
      -Interfaces into the security implementation have been updated
      to mesh with the above changes, but the implementation itself
      is NOT currently functional.
      Change-Id: Iccf9e174b7d41d81eba89c010b8dbef9b090fc4e
      Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
      Reviewed-on: https://gerrit.iotivity.org/gerrit/21607
  10. 30 Jan, 2017 1 commit
    • Kishen Maloor's avatar
      Remove oc_stack_errno and modify .init callback · 9c28b2a3
      Kishen Maloor authored
      oc_stack_errno was an incomplete idea and a TODO. Its use was
      however limited to operations in the initialization callback as
      errors in other places are explicitly/implicitly handled.
      Modified the .init callback to instead return a value >=0 on success
      that is checked inside oc_main_init(). A value <0 stops further
      stack initialization.
      Updated oc_add_device() and oc_init_platform() to return -1 on error,
      and 0 on success.
      Change-Id: I5877083f7602960c6fd3b93628cd1908498d4ef8
      Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
      Reviewed-on: https://gerrit.iotivity.org/gerrit/16869
  11. 26 Jan, 2017 1 commit
    • Kishen Maloor's avatar
      Clear up warnings · 1c4b456b
      Kishen Maloor authored
      * ISO C99 doesn’t support unnamed structs/unions
          -Modified the unamed unions in oc_rep_t and oc_endpoint_t,
           and updated all affected modules.
      * ISO C forbids conversion of object pointer to function
        pointer type
          -Factored out the response and discovery handlers into a
           client_handler union which is stored in oc_client_cb_t.
           This way each type of handler can be explicitly stored
           and invoked as such instead of storing them as a void *
           and doing a conversion.
      * ISO C forbids an empty translation unit
      * unused-parameter
      * missing-field-initializers
      * sign-compare
      * pointer-sign
      * unused-but-set-variable
      * strict-prototypes
      Change-Id: Ieb2dc4e9cf55313f92b348fac8391fb93b3141df
      Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
      Reviewed-on: https://gerrit.iotivity.org/gerrit/16769
  12. 30 Sep, 2016 1 commit
  13. 29 Sep, 2016 1 commit
  14. 28 Sep, 2016 1 commit
  15. 22 Sep, 2016 1 commit
  16. 16 Sep, 2016 1 commit
  17. 12 Sep, 2016 1 commit
  18. 16 Aug, 2016 1 commit
  19. 12 Aug, 2016 1 commit
    • Kishen Maloor's avatar
      Added new sample applications · 3a2b0181
      Kishen Maloor authored
      * Server application exclusively for Zephyr to demonstrate
        periodic (or otherwise) reads from hardware (fake temperature sensor)
        in a fiber, and also defining an interrupt handler block using tiny
        OCF's APIs. The fiber constantly reads new values, and signals the
        interrupt handler once its finished reading a new value. The interrupt
        handler once scheduled processes any outstanding GET request for that
        The server also demonstrates use of the separate response feature
        for performing GET requests.
      * A regular client application for Linux that subscribes for notifications
        of new temperature sensor readings from the server.
      Change-Id: Ibb2a269b957aad53ce6b8695518daa8776b372d7
      Signed-off-by: Kishen Maloor's avatarKishen Maloor <kishen.maloor@intel.com>
      Signed-off-by: default avatarThiago Macieira <thiago.macieira@intel.com>
      Reviewed-on: https://gerrit.iotivity.org/gerrit/10425