From: albertleng on
Hi LFS,

I think there isn't a need to keep track of which booking time slot
the tap in and tap out of a room belongs to. I mean if let say a tap-
in is done, automatically, all the LightOff Time should be adjusted to
15 minutes after the finish time of all the slots. It means the room
is occupied. So, it's ok to keep the light on until 15 minutes after
the ending time.

If a tap out is received, naturally, the light should be off 15
minutes after the tap out.

> But the problem I forsee is what happens when the room is booked
> from 5:00pm to 6:00pm AND from 6:00pm to 7:00pm. and you
> get a TapIn call at 5:55pm. Is that from the first booking or does it
> belong to the second?
It doesn't matter. In this case, because of the tap in, the 1st
booking will be changed to 5:00pm to 6:15pm while the 2nd booking will
be 6:00pm to 7:15pm. Based on tap in and tap out, the LightOff time of
each slot will keep adjusting.

By the way, i have changed my code slightly as below where i added a
boolean m_IsNewSlot to only change LightOff if it's a tap in or out
for a room

'In Slot Object class
Public Property Let Occupied(ByVal vOccupied As Boolean)
'Tapping in or out before booking ends
If Now <= m_Finish Then
If Not m_IsNewSlot Then
'Tapping in
If vOccupied = True Then
m_LightsOff = DateAdd("n", 15, Finish)
Else
'Tapping out
'TODO: That's the part thing goes wrong
m_LightsOff = DateAdd("n", 15, Now)
End If
End If
End If
m_Occupied = vOccupied
End Property



Anyway, our client just informed us that some of the rooms don't have
access card device installed. So, the tap in and tap out do not apply.
It's just start at start time and end at 15 minutes after finish time.
So, I'll have to wait for more confirmation for the requirements.
From: albertleng on
Hi LFS,

I think there isn't a need to keep track of which booking time slot
the tap in and tap out of a room belongs to. I mean if let say a tap-
in is done, automatically, all the LightOff Time should be adjusted to
15 minutes after the finish time of all the slots. It means the room
is occupied. So, it's ok to keep the light on until 15 minutes after
the ending time.

If a tap out is received, naturally, the light should be off 15
minutes after the tap out.

> But the problem I forsee is what happens when the room is booked
> from 5:00pm to 6:00pm AND from 6:00pm to 7:00pm. and you
> get a TapIn call at 5:55pm. Is that from the first booking or does it
> belong to the second?
It doesn't matter. In this case, because of the tap in, the 1st
booking will be changed to 5:00pm to 6:15pm while the 2nd booking will
be 6:00pm to 7:15pm. Based on tap in and tap out, the LightOff time of
each slot will keep adjusting.

By the way, i have changed my code slightly as below where i added a
boolean m_IsNewSlot to only change LightOff if it's a tap in or out
for a room

'In Slot Object class
Public Property Let Occupied(ByVal vOccupied As Boolean)
'Tapping in or out before booking ends
If Now <= m_Finish Then
If Not m_IsNewSlot Then
'Tapping in
If vOccupied = True Then
m_LightsOff = DateAdd("n", 15, Finish)
Else
'Tapping out
'TODO: That's the part thing goes wrong
m_LightsOff = DateAdd("n", 15, Now)
End If
End If
End If
m_Occupied = vOccupied
End Property



Anyway, our client just informed us that some of the rooms don't have
access card device installed. So, the tap in and tap out do not apply.
It's just start at start time and end at 15 minutes after finish time.
So, I'll have to wait for more confirmation for the requirements.
From: Larry Serflaten on

"albertleng" <albertleng(a)gmail.com> wrote
> Hi LFS,
>
> I think there isn't a need to keep track of which booking time slot
> the tap in and tap out of a room belongs to. I mean if let say a tap-
> in is done, automatically, all the LightOff Time should be adjusted to
> 15 minutes after the finish time of all the slots. It means the room
> is occupied. So, it's ok to keep the light on until 15 minutes after
> the ending time.

As you are aware, I would suggest we take this to email to finish up
some loose ends....

LFS


From: mp on

"Larry Serflaten" <serflaten(a)gmail.com> wrote in message
news:i02m89$3sf$1(a)news.eternal-september.org...
>
> "albertleng" <albertleng(a)gmail.com> wrote
>> Hi LFS,
>>
>> I think there isn't a need to keep track of which booking time slot
>> the tap in and tap out of a room belongs to. I mean if let say a tap-
>> in is done, automatically, all the LightOff Time should be adjusted to
>> 15 minutes after the finish time of all the slots. It means the room
>> is occupied. So, it's ok to keep the light on until 15 minutes after
>> the ending time.
>
> As you are aware, I would suggest we take this to email to finish up
> some loose ends....
>
> LFS
>
>

except it's very interesting for beginners like me to see the process of
honing in on an oo problem
....besides, how busy is this group anymore...it's not like you're wasting
precious bandwidth <g>
....plus there's no yelling and name calling and arguing about language -
what a joy!!!
:-)
mark


From: Larry Serflaten on

"mp" <nospam(a)thanks.com> wrote

> > As you are aware, I would suggest we take this to email to finish up
> > some loose ends....
>
> except it's very interesting for beginners like me to see the process of
> honing in on an oo problem
> ...besides, how busy is this group anymore...it's not like you're wasting
> precious bandwidth <g>
> ...plus there's no yelling and name calling and arguing about language -
> what a joy!!!

I don't want to quote a private email without the senders permission,
but the summary of it was he had tried for a day to get a reply posted,
and finally went to email. I replied to one of those posts (that eventually
wound up here).

The option is his, of course, I'm just suggesting an alternative.

LFS