View Issue Details

IDProjectCategoryView StatusLast Update
00034011 - BacklogEnhancementpublic2019-08-14 00:58
ReporterdougAssigned ToK7ZCZ 
PriorityhighSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0003401: Add feature in QLM for panadapter
DescriptionAdd feature in QLM for panadapter and add a method to be able to tell if it is enabled for a given user.
TagsNo tags attached.
ModuleSW License Mgmt
Sub-Module(select)
TestingNot Started

Activities

doug

2019-08-11 14:48

developer   ~0008372

I added functionality to implement this in 6.7.
You can do it a couple of different ways. First, you can just ask for the users expiration date, and enable/disable based on date. Second, you can define a new feature in HRDSoracoLicenser.h and specify the date required in HRDSoracoLicenser.cpp.

Some sample code of how it can be used below.


COleDateTime expireDate;
    COleDateTime featureMinDate;
    CString msg;
    HRDGetMaintenanceExpiration(&expireDate);

    msg.Format(_T("This feature is from '%s'"), expireDate.Format());
    AfxMessageBox(msg);

    if (HRDCheckFeature(HF_PAN_ADAPTER))
    {
        AfxMessageBox(_T("You can use the Pan Adapter "));
    }


    if ( HRDCheckFeature(HF_FAKE_FEATURE_OF_THE_FUTURE))
    {
        AfxMessageBox(_T("Howdy future man."));
    }
    else
    {
        AfxMessageBox(_T("You cannot use this fake feature of the future."));
    }

    if ( !HRDCheckFeature(HF_FAKE_FEATURE_OF_THE_FUTURE, &expireDate, &featureMinDate))
    {
    

        msg.Format(_T("You cannot use this fake feature of the future. You expired '%s', this feature is from '%s' "),
            expireDate.Format(), featureMinDate.Format());
        AfxMessageBox(msg);
    }

K7ZCZ

2019-08-12 16:31

administrator   ~0008392

Change set 5115 edits HRDStationLicense.h and HRStationLicense.cpp with lines that use two spaces instead of tabs for indentation. In this project, we use tabs set at every fourth column. Can the indenting style be fixed, please?

HRD_FEATURES is an enum, but HRDCheckFeature takes an int for the feature ID. Seems like it should take an enum type.

I'm not perfectly sure I understand the business logic. Looks like HRDCheckFeature will return TRUE if the user's license expries after a certain date. For a given feature, how od we decide which date to compare against? Which date should be used for the panadapter feature, for example?

doug

2019-08-14 00:58

developer   ~0008404

Fixed the indents (i think). think I got rid of all the leading spaces.
Changed it to the int to the correct enum

Logic goes likes, for each new feature we..
1. Add it to the HRD_FEATURES enum
2. Add the valid logic (i.e. checking the min date) to the switch in HRDCheckFeature

Right now the pan adapter is .....
case HF_PAN_ADAPTER:

        featureMinDate = COleDateTime(2020, 1, 1, 0, 0, 0);

        if ( expDate > featureMinDate)
        {
            bRetVal = TRUE;
        }
        break;

Where the 1/1/2020 is just an arbitrary date I picked.

There are 3 way to do this..
Option #1 -So simple way is...
 if (HRDCheckFeature(HF_PAN_ADAPTER))
    {
        AfxMessageBox(_T("You can use the Pan Adapter "));
    }

Option #2 - So this way, will give you some dates back in case you want to show a message or something....
    if ( !HRDCheckFeature(HF_FAKE_FEATURE_OF_THE_FUTURE, &expireDate, &featureMinDate))
    {
    
    msg.Format(_T("You cannot use this fake feature of the future. You expired '%s', this feature is from '%s' "),
            expireDate.Format(), featureMinDate.Format());
        AfxMessageBox(msg);
    }

Option #3 - Just gets the users expiration date, and make your own logic, we probably want to use the feature id, but this gives us some flexibility.
   COleDateTime featureMinDate;
    HRDGetMaintenanceExpiration(&expireDate);

Issue History

Date Modified Username Field Change
2019-07-22 21:49 doug New Issue
2019-07-22 21:49 doug Status new => assigned
2019-07-22 21:49 doug Assigned To => doug
2019-07-23 09:22 K7ZCZ Module (select) => SW License Mgmt
2019-08-11 14:45 doug Assigned To doug => K7ZCZ
2019-08-11 14:48 doug Note Added: 0008372
2019-08-12 16:31 K7ZCZ Note Added: 0008392
2019-08-12 16:31 K7ZCZ Assigned To K7ZCZ => doug
2019-08-14 00:58 doug Assigned To doug => K7ZCZ
2019-08-14 00:58 doug Status assigned => resolved
2019-08-14 00:58 doug Resolution open => fixed
2019-08-14 00:58 doug Note Added: 0008404