ppegusii / cs677-smart-homes-IoT

Programming Assignment 1: Internet of Things and Smart Homes
GNU General Public License v2.0
2 stars 0 forks source link

implement sendState in push sensors #29

Open ppegusii opened 9 years ago

ameetrivedi commented 9 years ago

what should be the after function (???? below) :

func (m *MotionSensor) sendState() { replica := m.greplica.Get() util.RpcAsync(replica.Address, replica.Port, "Gateway.ReportMotion", m.state.GetState(), &api.Empty{}, this.????, false) }

ameetrivedi commented 9 years ago

assigned you so it gets your attention... assign it back to me with the function name

ppegusii commented 9 years ago

I think it's fine to use a synchronous call here because the only way to get to sendState is through ChangeState, which will be it's own go routine anyways. So no blocking that we care about will occur.

ameetrivedi commented 9 years ago

compiles and registration id's returned are correct. Thoroughly testing it now.