Package com.wibu.cm

Class CodeMeter.CMACCESS2

  • Enclosing class:
    CodeMeter

    public static class CodeMeter.CMACCESS2
    extends java.lang.Object
    CMACCESS2 specifies additional data for the CmAccess2 call.

    CMACCESS specifies additional data for the Access Modes to a SubSystem (SubSystem Access), to a CmContainer (Box Access), to a single Firm Item (FC, Firm Item Access) or a CmContainer entry (FC:PC, Entry Access) in a given subsystem.

    Definition for the class CMACCESS corresponding to the c-api struct CMACCESS

    • Constructor Summary

      Constructors 
      Constructor Description
      CMACCESS2()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setUsedRuntimeVersion​(int majorVersion, int minorVersion)
      Helper function to easily set the minimum required runtime version.
      void setUsedRuntimeVersion​(int majorVersion, int minorVersion, int build)
      Helper function to easily set the minimum required runtime version.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ctrl

        public long ctrl
        ctrl specifies the kind of the subsystem access by setting one of the following flags. The following flags are possible:
        • CM_ACCESS_USERLIMIT needs a license for each CmAccess2() call. The NetworkCounter will be decreased by one at each access.
        • CM_ACCESS_NOUSERLIMIT needs no license for each CmAccess2() call. The NetworkCounter will be not decreased in this mode.
        • CM_ACCESS_EXCLUSIVE needs a license for each CmAccess2() call and on a computer only one access to the specified entry is permitted. The NetworkCounter will be decreased by one at each access.
        • CM_ACCESS_FIRMITEM forces a Firm Item access to an CmContainer entry.
        • CM_ACCESS_STATIONSHARE needs a license for each CmAccess2() call and on a computer only one license to the specified entry is blocked. The NetworkCounter will be decreased by one once per computer.
        • CM_ACCESS_CONVENIENT needs in the local subsystem (CmLocal) no license (works here as CM_ACCESS_NOUSERLIMIT) and in the network (CmLAN) one license per access (works here as CM_ACCESS_USERLIMIT).
        This flags can be or'ed with one of the following flags:
        • CM_ACCESS_FORCE forces the access to an entry, which has a expired Expiration Time, an invalid Activation Time or a UnitCounter, which is 0. Normally CmAccess2() does not return a valid handle if one of the three Product Item Options has not a true value.
        • CM_ACCESS_CHECK_FSB specifies that the wanted access must be done to a Firm Security Box (FSB). If the specified entry is not inside a FSB an error is returned.
        • CM_ACCESS_CHECK_CTSB specifies that the wanted access must be done to a Certified Time Security Box (CTSB). If the specified entry is not inside a CTSB an error is returned.
        • CM_ACCESS_SUBSYSTEM specifies that the wanted access can also be a SubSystem Access. In this case mulFirm Code must be set to 0.
      • firmCode

        public long firmCode
        Contains the Firm Code of the access mode. Which Firm Code must be set for the different access modes you can see at the description of the CmAccess2() function
      • productCode

        public long productCode
        Contains the Product Code of the access mode. Which Product Code must be set for the different access modes you can see at the description of the CmAccess2() function.
      • featureCode

        public long featureCode
        Contains the Feature Code, which must map a given Feature Map. If the Feature Code is 0 there is no search for a fitting Feature Map.
      • usedRuntimeVersion

        public long usedRuntimeVersion
        Contains the minimum driver version of CodeMeter that has to be present. The version must be coded in a single long value by shifting the major/minor/build version:
        cmacc.usedRuntimeVersion = (majorVersion << 24) | (minorVersion << 16) | ((build &0x0ffff)); where build may be set to 0.
        See Also:
        setUsedRuntimeVersion(int, int)
      • productItemReference

        public short productItemReference
        Product Item Reference of the the Product Item to access.
      • minBoxMajorVersion

        public short minBoxMajorVersion
        Contains the major firmware version of the CmContainer to access.
      • minBoxMinorVersion

        public short minBoxMinorVersion
        Contains the minor firmware version of the CmContainer to access.
      • boxMask

        public short boxMask
        Contains the box mask of the CmContainer to access.
      • serialNumber

        public long serialNumber
        Contains the serial number of the CmContainer to access.
      • servername

        public java.lang.StringBuffer servername
        Contains the name of the CodeMeter server to access. The string length must not exceed 128 characters.
    • Constructor Detail

      • CMACCESS2

        public CMACCESS2()
    • Method Detail

      • setUsedRuntimeVersion

        public void setUsedRuntimeVersion​(int majorVersion,
                                          int minorVersion)
        Helper function to easily set the minimum required runtime version.
        Parameters:
        majorVersion - minimum major version e.g. '4' for 4.01
        minorVersion - minimum minor version e.g. '1' for 4.01
        See Also:
        usedRuntimeVersion
      • setUsedRuntimeVersion

        public void setUsedRuntimeVersion​(int majorVersion,
                                          int minorVersion,
                                          int build)
        Helper function to easily set the minimum required runtime version.
        Parameters:
        majorVersion - minimum major version e.g. '4' for 4.01
        minorVersion - minimum minor version e.g. '20' for 4.20
        build - minimum build number, e.g. 283 for 4.20 Build 283
        See Also:
        usedRuntimeVersion